Help - Search - Members - Calendar
Full Version: Redirect loop
HTMLHelp Forums > Programming > Web Server Configuration
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.

Does the dubdomain live in a subdirectory of the main domain? blink.gif
des id does
Darin McGrew
You can't do it with simple redirects. You can do it with mod_rewrite though. Search for the "Canonical Hostnames" example in the Apache URL Rewriting Guide.
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."

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
anyway I really like that term dubdomain . . . good name for a nightclub
Just rub it in... IPB Image
doncha mean wub it in you silly wabbit? IPB Image
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2019 Invision Power Services, Inc.