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

[eluser]Unknown[/eluser]
Hi everybody.

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


My .htaccess
Code:
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.
#2

[eluser]Unknown[/eluser]
Any ideas? Maybe somebody post his working .htaccess? I will be appreciate for it.




Theme © iAndrew 2016 - Forum software by © MyBB