Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Web Server Configuration _ Redirect loop

Posted by: jimlongo Mar 30 2007, 10:44 PM

on a unix server how can I redirect the following from to subdomain.mydomain/Generals

What i have now in my .htaccess file is

RedirectPermanent /Generals

also tried

RedirectMatch permanent ^/Generals$

Either gives me a redirect loop that won't resolve.


Posted by: pandy Mar 31 2007, 07:37 AM

Does the dubdomain live in a subdirectory of the main domain? blink.gif

Posted by: jimlongo Mar 31 2007, 09:23 AM

des id does

Posted by: Darin McGrew Mar 31 2007, 01:03 PM

You can't do it with simple redirects. You can do it with mod_rewrite though. Search for the "Canonical Hostnames" example in the

Posted by: jimlongo Mar 31 2007, 01:16 PM

Thanks Darin,

I love the line . . . "With mod_rewrite you either shoot yourself in the foot the first time and never use it again or love it for the rest of your life because of its power."

Posted by: pandy Mar 31 2007, 02:51 PM

Crap. I suspected that was the answer. I realized I nowadays have the same situation as you do. The CP forces the location of subdomains' root folders inside the main domain's folder. I suck at mod_rewrite or anything else that involves regex. ninja.gif

Posted by: jimlongo Mar 31 2007, 03:33 PM

anyway I really like that term dubdomain . . . good name for a nightclub

Posted by: pandy Mar 31 2007, 03:59 PM

Just rub it in... IPB Image

Posted by: jimlongo Mar 31 2007, 05:33 PM

doncha mean wub it in you silly wabbit? IPB Image

Powered by Invision Power Board (
© Invision Power Services (