Welcome Guest, Not a member yet? Register   Sign In
.htaccess 301 redirect

Hi everybody.

I need to redirect old urls to new ones and make www-redirect to www-less url using .htaccess

My .htaccess
RewriteEngine on
RewriteCond $1 !^(index\.php|robots\.txt|images|gallery-images|articles-images|css|js)
RewriteRule ^(.*)$ /index.php?/$1 [L]

RewriteCond %{HTTP_HOST} ^www.domain.com\.ua
RewriteRule ^(.*)$ http://domain.com.ua/$1 [R=permanent,L]

Redirect 301 /old-link http://domain.com.ua/newlink

I received such problems:
www.domain.com.ua - domain.com.ua/index.php?/ (why index.php? appears?)
domain.com.ua/old-link - domain.com.ua/newlink?/old-link (why old link appears in the end and no redirection happens)

Please, need help.

Messages In This Thread
.htaccess 301 redirect - by El Forum - 09-06-2012, 12:09 PM
.htaccess 301 redirect - by El Forum - 09-11-2012, 07:22 AM

Theme © iAndrew 2016 - Forum software by © MyBB