Hey guys, We recently changed how some parts of our website work and I need to redirect www.myurl.com/example to /example.html. Some other pages on the site still use the /example type pages so it can't be a global command that will mess up other directories Can anyone give me a hand here, I tried a standard format one and it didn't work.
empty your /example/index.php page and put this (and only this) at in the page. <? Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.myurl.com/example.html" ); ?> Code (markup):
Thanks for the reply DOA, the problem is the new system has removed this directory, is that the reason a standard 301 didn't work?
Yes, so your exisiting users are trying to visit /example/ and getting a 404 error? Solution - create a new directory /example/ and then create a file called index.php inside it. Then put in the code as above. Therefore your exisiting users with bookmarks etc will be automatically redirected to your new page.