Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2011-10-29 16:27:16
- newnoise
- Member
- Registered: 2011-02-24
- Posts: 35
Freaking out about .htaccess file
Hey Guys,
for SEO-Reason I’m working on a 301 redirect using .htaccess. But it isn’t working. What I want is redirect www.fjellsmug.com to fjellsmug.com.
The behaviour right now is pretty strange. On the page there are 5 category links, all done exactly the same (like: <a href=”<txp:section name=“news” url=“1” />”>news</a>). The first two do NOT work (news and artists) but the 3 others one do.
Also NON-WWW still redirects to WWW, which is not in my code anymore.
Here is my .htaccess-file:
´DirectoryIndex index.php index.html
Options +FollowSymLinks
#Options -Indexes
#ErrorDocument 403 default
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase /
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}]
RewriteCond %{HTTP_HOST} ^www.fjellsmug.com$ [NC] RewriteRule ^(.*) http://fjellsmug.com/$1 [R=301,L]
RewriteRule ^(.+[^/])$ http://fjellsmug.com/$1/ [R=301,L]
</IfModule>
#php_value register_globals 0
Under settings URL for the page is http://fjellsmug.com.
Do you need anymore information? Because I dont have any idea anymore …
Thanks!
Offline
#2 2011-10-29 17:14:46
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,477
Re: Freaking out about .htaccess file
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{http_host} !^fjellsmug\.com$ [NC]
RewriteRule ^(.*)$ http://fjellsmug.com/$1 [R=301,L]
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>
Offline
#3 2011-10-30 16:11:38
- newnoise
- Member
- Registered: 2011-02-24
- Posts: 35
Re: Freaking out about .htaccess file
Thank you so much!
Offline
Pages: 1