Posted by John_Moylan (jfp), 24 July 2005I have created this as a 404 (not found) error page to do a 301 (Moved Permanently) redirect.
Seems to work and it is very simple I know, but is it too simple?
Have I missed anything that anyone can see/think of?
I did this as a php 404 page instead of using mod_rewrite for any future "enhancements/hoop jumping" that *may* be needed that could not be done with mod_rewite.
edit: All I'm doing is moving a site from .co.uk to .com varient of a domain name. I know the code says the opposite, but I'm only testing.
Posted by admin (Graham Ellis), 24 July 2005PHP is written to make this things appear easy
If I was doing this, I would do sanity checks with relative and absolute paths within the pages to make sure that all of them were correctly diverted (and that the new domain didn't have any old absolute URLs in it to the old domain). Would also check that it worked with data content on POST and GET methods ... it probably does.
I suspect that you'll loose cookies??
Posted by John_Moylan (jfp), 28 July 2005Thanks Graham.
I don't think losing cookie data is an issue in this case, thankfully.
Thanks again for your input on this.
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: email@example.com • WEB: http://www.wellho.net • SKYPE: wellho