Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2010-04-22 11:20:01
- grinstead
- Member
- From: UK
- Registered: 2006-10-06
- Posts: 19
301 Redirect too many redirects error
Hi,
I have an issue with a 301 redirect, seeing an error stating that there is too many page redirects! Basically wish to add a redirect for a change in domain!
This is what I have in the htaccess file…
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /relative/web/path/
RewriteRule (.*) http://www.domain.com/$1 [R=301,L] #(this has been added to the default textpattern htaccess file)
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) – [PT,L]
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*) index.php
RewriteCond %{HTTP:Authorization} !^$
RewriteRule .* – [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>
Any help would be much appreciated.
Many thanks
Offline
#2 2010-04-24 07:55:53
- makss
- Plugin Author
- From: Ukraine
- Registered: 2008-10-21
- Posts: 355
Re: 301 Redirect too many redirects error
RewriteRule (.*) http://www.NEWdomain.com/$1 [R=301,L]
or try redirect via PHP
1. Create file 301.php
<?php $ref=$_SERVER['QUERY_STRING']; if ($ref!='') $ref='?'.$ref; header('HTTP/1.1 301 Moved Permanently'); header('Location: http://newdomain.com/'.$ref); exit(); ?>
2. Add in .htaccess
RewriteCond %{REQUEST_URI} ^/301.php$ RewriteRule ^(.*) - [L] RewriteCond %{REQUEST_URI} ^.*$ RewriteRule ^(.*)$ /301.php [L]
aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)
Offline
#3 2010-04-27 09:46:16
- grinstead
- Member
- From: UK
- Registered: 2006-10-06
- Posts: 19
Re: 301 Redirect too many redirects error
Hi makss. Apologies for the delay in replying.
Unfortunately I’m still getting a ‘too many redirects’ error when following your second option!
Offline
Pages: 1