Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2009-03-21 13:09:06
- finkchiro
- New Member
- Registered: 2009-03-21
- Posts: 5
links not working after redirect 301 .htaccess change
Adding the following to the .htaccess file:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^finkwellness.com [NC]
RewriteRule ^(.*)$ http://www.finkwellness.com/$1 [L,R=301]
messed up the links on my site. Prior to this change in .htaccess clicking on the massage link would result in being directed to finkwellness.com/massage/22.
after adding the redirect to .htaccess, the massage link was sent to finkwellness.com/index.php/22 and page showed “no input file specified.”
Any ideas?
Offline
Re: links not working after redirect 301 .htaccess change
Try escaping the RewriteCond’s dot:
RewriteCond %{HTTP_HOST} ^finkwellness\.com [NC]
Offline
#3 2009-03-21 13:37:18
- finkchiro
- New Member
- Registered: 2009-03-21
- Posts: 5
Re: links not working after redirect 301 .htaccess change
Thanks for the reply. But result is the same.
Offline
#4 2009-03-21 14:25:56
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: links not working after redirect 301 .htaccess change
Shouldn’t that be
RewriteCond %{HTTP_HOST} ^finkwellness\.com$ [NC]
Offline
#5 2009-03-21 14:50:45
- finkchiro
- New Member
- Registered: 2009-03-21
- Posts: 5
Re: links not working after redirect 301 .htaccess change
Added the $. Same result.
Offline
#6 2009-03-21 15:34:08
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: links not working after redirect 301 .htaccess change
Can you post your complete .htaccess?
Offline
#7 2009-03-21 16:11:06
- finkchiro
- New Member
- Registered: 2009-03-21
- Posts: 5
Re: links not working after redirect 301 .htaccess change
Here it the .htaccess file all its glory… [suggested changes from previous posts in place]
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#Options -Indexes
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase /
RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]
RewriteRule ^(.*) index.php
RewriteCond %{HTTP:Authorization} !^$
RewriteRule .* – [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>
#php_value register_globals 0
RewriteEngine on
RewriteCond %{HTTP_HOST} ^finkwellness\.com$ [NC]
RewriteRule ^(.*)$ http://www.finkwellness.com/$1 [L,R=301]
Offline
#8 2009-03-21 17:31:41
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: links not working after redirect 301 .htaccess change
Try this:
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [PT,L]
RewriteCond %{HTTP_HOST} ^finkwellness\.com$ [NC]
RewriteRule ^(.*)$ http://www.finkwellness.com/$1 [L,R=301]
RewriteRule ^(.*) index.php
RewriteCond %{HTTP:Authorization} !^$
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>
#php_value register_globals 0
Offline
#9 2009-03-21 18:38:53
- finkchiro
- New Member
- Registered: 2009-03-21
- Posts: 5
Re: links not working after redirect 301 .htaccess change
That did it. Thank you so much.
Offline