Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

301- Your dearest friend, or your worst enemy!

Status
Not open for further replies.

Olavxxx

Programmer
Sep 21, 2004
1,134
NO
Hi,

Some of you might not know of codes like 404, 301, 302, etc.

They are codes for things like "page not found", "page temporarily moved", "internal server error", etc.

If you use PHP to make a redirect, with the header, it is a "must" to use the 301, if you do not want to get penalized by google.

However, if you have a dynamic site, this might give you some serious headaches! I implemented a google-friendly .htaccess mod, so I can make "virtual" folders.

However, then the images did not work.
I thought it might be because of the virtual folders, I tried and tried, scratched my head, etc.

Then, suddenly, I copied back my original index.php
(that's where I had the 301)

When I did that, suddenly everything worked!
eg. it seems that the 301 redirect somehow messes up the path, when using relative paths. I also tried specifying but it did also not work.

I will post back later, when I have figured out what is bugging my scripts.

Olav Alexander Mjelde
Admin & Webmaster
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top