Jump to content

.htaccess rewrite help


Canman2005

Recommended Posts

Hi all

 

Wonder if you can give me some advice, I am using the .htaccess Rewrite for my news section, so rather than using

 

www.domain.com/news.php?id=2324

 

I can now use

 

www.domain.com/news/2324

 

The problem I have is now all the links are broken because I have gone up one level to the news folder, so any links which had

 

<img src="images/logo.jpg">

 

are now broken, as they need to target

 

<img src="../images/logo.jpg">

 

I have tons of includes, so my only option is to create duplicate includes and target them down one level using

 

../

 

before each target.

 

Is there any php code which can auto change links to go down one level in a specific page, including changing all the link references in the include files?

 

Thanks everyone

 

Dave

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.