Jump to content

HELP WITH CREATING A PARTICULAR REWRITE RULE


bulletck

Recommended Posts

  • 2 weeks later...

My file structure is as follows:

 

webroot/css

webroot/img

webroot/js

webroot/page1.php

webroot/page1_sub.php

 

So now using the rewrite rules I have http://webroot/page1/ render page1.php and http://webroot/page1/sub render page1_sub.php. All my paths to css, image and js files are relative. So page1 is fine but page1_sub is not. Is there a way I can keep all my php pages directly in the root and have all paths be relative with this new rewrite rule in place?

Hrmmmm, it's not possible to have /folder/ treated like it's in the root.  Well it might be possible through some obscure HTML tag or something, but no idea.

 

 

 

You could just change all the links your self.  Or, worst case, you could use preg_replace along with output buffering to rewrite links.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.