Redirection problems with site re-organization

Using a single web hosting account to host multiple sites

Postby richardk » Tue Dec 19, 2006 12:55 pm

Ugh

Code: Select all
Redirect 301 /emet http://www.emetnews.org
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{HTTP_HOST} ^(www\.)?shamar\.org$ [NC]
RewriteCond %{DOCUMENT_ROOT}/emet{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}/emet{REQUEST_URI} -d
RewriteRule ^(.*)$ http://www.emetnews.org/$1 [R=301,L]

RewriteCond %{HTTP_HOST} ^(www\.)?shamar\.org$ [NC]
RewriteRule ^emet(/(.*))?$       http://www.emetnews.org/$2          [R=301,L]
RewriteCond %{HTTP_HOST} ^(www\.)?shamar\.org$ [NC]
RewriteRule ^current\.(php|htm)$ http://www.emetnews.org/current.php [R=301,L]

RewriteCond %{HTTP_HOST} ^(www\.)?shamar\.org$ [NC]
RewriteCond %{REQUEST_URI} ^(/.+\.)htm$ [NC]
RewriteCond %{DOCUMENT_ROOT}%1php -f
RewriteRule \.htm$ %1php [R,L]

RewriteCond %{HTTP_HOST} ^(www\.)?shamar\.org$ [NC]
RewriteRule ^weblog(/.*)?$ /cgi-bin/blosxom.cgi$1 [QSA,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby LeeU » Tue Dec 19, 2006 1:20 pm

Nope, still doesn't do it. I don't know why this is so difficult. I do also have an .htaccess file in the "/emet/" directory. Does that make a difference? (I need it for that domain now.)
LeeU
 
Posts: 8
Joined: Mon Dec 18, 2006 9:03 am

Postby LeeU » Tue Dec 19, 2006 6:58 pm

I think I have it figured. In the .htaccess file for the new domain, I had the following:

Code: Select all
RewriteBase  /


which, evidently, kept the whole process in a loop.

I changed it to:

Code: Select all
RewriteBase  /emet


and now it works.

Thanks for all your help!
LeeU
 
Posts: 8
Joined: Mon Dec 18, 2006 9:03 am

Previous

Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 32 guests

cron