5 Years
Discussion Span
Last Post by joshl_1995

use absolute path for css/js/images..

or try: RewriteRule ^path_to_css_folder$ /path_to_css_folder


Yer i know that would work but then i misewell just put the page in another subfolder.
I just want a way to make it look like the page is in another subfolder not virtually put it in a subfolder.


Well does "making it look like it is in a subfolder" not equal "virtually putting it in a subfolder"? ;) This is the only option I know about that works, but I'm curious as to what others think of this.


You've been given the correct info. You use an Apache mod_rewrite in your .htaccess file

To ignore your css files, you just add the ^ line.

Here's an example of an old one of mine:

Options +FollowSymlinks
RewriteEngine On
RewriteRule ^(js|css)($|/) - [L]
RewriteRule ^([^/]*)/([^/]*)/*$ /index.php?lang=$1&page=$2 [L]
ErrorDocument 404 /404.php

The third line stops rewrite for directories with js or css in them
Ignore the line after that - just my own rewrite


I don't fully understand .htaccess so could you show me how i can use this.
This is what i have so far:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(js|css)($|/projects) - [L]
RewriteRule ^projects/software.php software.php [L]

I'm sure i've done it wrong because there is still no stlying.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.