The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Redirect loop
jimlongo
post 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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Mar 31 2007, 07:37 AM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



Does the dubdomain live in a subdirectory of the main domain? blink.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
jimlongo
post 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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post 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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
jimlongo
post 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."

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Mar 31 2007, 02:51 PM
Post #6


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
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. ninja.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
jimlongo
post 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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Mar 31 2007, 03:59 PM
Post #8


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



Just rub it in... IPB Image
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
jimlongo
post 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? IPB Image
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 04:17 AM