PDA

View Full Version : Webcraft: How to do a global domain redirect


Greg
05-13-2007, 08:01 AM
I know how to do a single-file redirect using the .htaccess file in the Apache web server, but is there a way to do a global redirect for the whole domain including any subdomains?

Strategic thinking: It might be best to redirect *.simshost.com/*.* to *.sunsims.com/*.*, including any links to things in subdirectories. That would avoid broken links, especially to images under thesims2.simshost.com, while also avoiding having to keep the simshost.com domain operating as a unique site.

If I can just substitute "sunsims.com" for "simshost.com" in any URL that points to *.simshost.com, and have the web server deliver the right file, that will solve a lot of problems.

It must be possible with some kind of rewrite rules but I'm no expert with rewrite rules.

Miros1
05-13-2007, 01:49 PM
Dana and Randall won't talk to you? They're my primary resource for that sort of thing!

I'm not sure if you want to make that *.sunsims.com; links to my old site would go to woodensimolean.sunsims.com, and that doesn't exist.

Greg
05-13-2007, 02:35 PM
I'm not sure if you want to make that *.sunsims.com; links to my old site would go to woodensimolean.sunsims.com, and that doesn't exist.

After June 1, woodensimoean.simshost.com will cease to exist in any case (along with almost all other *.simshost.com domain names), so it doesn't matter whether people get a "not found" error from simshost.com or sunsims.com.