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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.