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
https://forums.phpfreaks.com/topic/169424-htaccess-rewrite-help/
Share on other sites

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.