help with mod_rewrite

advertisements

alright so lately ive been messing around with mod_rewrite trying to get it work on website im working on to make the urls more appealing to non-programmers so far i have.

Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteBase /newstuff
RewriteRule ^page/([0-9]+)/option/([0-9]+)?$ page.php?loc=$1&option=$2

when i go to the page page/3/option/3 none of my css files or anything loads i know its because im in a different directory now but is their anyway i can get it to work without having to tweak where all my files are being loaded from?


No, you will have to stop using paths relative to the old URL. It's best if you plan for this from the start in the future: either always use paths relative to the URL of the site (/css/file.css will point to the same place no matter where you are) or use absolute URLs to the files.