Redirect loop |
Redirect loop |
jimlongo |
Mar 30 2007, 10:44 PM
Post
#1
|
This is My Life Group: Members Posts: 1,128 Joined: 24-August 06 From: t-dot Member No.: 16 |
on a unix server how can I redirect the following from mydomain.com/Generals to subdomain.mydomain/Generals
What i have now in my .htaccess file is RedirectPermanent /Generals http://subdomain.mydomain.com/Generals also tried RedirectMatch permanent ^/Generals$ http://subdomain.mydomain.com/Generals Either gives me a redirect loop that won't resolve. tia, jim |
pandy |
Mar 31 2007, 07:37 AM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,753 Joined: 9-August 06 Member No.: 6 |
Does the dubdomain live in a subdirectory of the main domain?
|
jimlongo |
Mar 31 2007, 09:23 AM
Post
#3
|
This is My Life Group: Members Posts: 1,128 Joined: 24-August 06 From: t-dot Member No.: 16 |
des id does
|
Darin McGrew |
Mar 31 2007, 01:03 PM
Post
#4
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
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.
|
jimlongo |
Mar 31 2007, 01:16 PM
Post
#5
|
This is My Life Group: Members Posts: 1,128 Joined: 24-August 06 From: t-dot Member No.: 16 |
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." |
pandy |
Mar 31 2007, 02:51 PM
Post
#6
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,753 Joined: 9-August 06 Member No.: 6 |
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.
|
jimlongo |
Mar 31 2007, 03:33 PM
Post
#7
|
This is My Life Group: Members Posts: 1,128 Joined: 24-August 06 From: t-dot Member No.: 16 |
anyway I really like that term dubdomain . . . good name for a nightclub
|
pandy |
Mar 31 2007, 03:59 PM
Post
#8
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,753 Joined: 9-August 06 Member No.: 6 |
Just rub it in...
|
jimlongo |
Mar 31 2007, 05:33 PM
Post
#9
|
This is My Life Group: Members Posts: 1,128 Joined: 24-August 06 From: t-dot Member No.: 16 |
doncha mean wub it in you silly wabbit?
|
Lo-Fi Version | Time is now: 21st September 2024 - 03:53 AM |