Canman2005 Posted August 9, 2009 Share Posted August 9, 2009 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 Quote Link to comment Share on other sites More sharing options...
Kieran Menor Posted August 9, 2009 Share Posted August 9, 2009 With that kind of url, you should probably use an absolute path to your images, etc. As in, rather than writing ../images, then just /images, if your images folder is at the domain root. This might also save you from future trouble. Quote Link to comment Share on other sites More sharing options...
Canman2005 Posted August 9, 2009 Author Share Posted August 9, 2009 thanks, ill give it a try Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.