Hi.
Is there a way to use mod_rewrite and use relative paths for images, links, etc? Or to put the current script path in the rule?
For example
RewriteRule cat/(.*)/$ cats.php?cat=$1
cats.php is relative to the path therefore it's wrong. Same thing happens with the images.
If i use /cats.php then i have to be in the web root and i can't use subdirectories for the scripts. Of course i can use RewriteBase but i don't want it as i'll be stuck with fixed settings.
The only way i know is to use <base href=""> but i also don't want that 🙂
Is there a way to do that in the mod_rewrite? For example
RewriteRule cat/(.*)/$ %{SERVER_PATH_TO_FILE}cats.php?cat=$1
I hope i made my self clear 🙂
Thanks,
John