almost okey February 2016

wildcard redirect pages in joomla with.htaccess

I have a website where I maked a redirection with .htaccess to redirect my

website.com

to

www.website.com

with this

RewriteCond %{HTTP_HOST} ^website\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.website\.com$
RewriteRule ^(.*)$ "http\:\/\/www\.awebsite\.com\/$1" [R=301,L]

that is okey, but I want to redirect all pages, i.e.:

website.com/anything

(now that page is not redirected) to redirect as well to

www.website.com/anything

Thanks in advance the help! :)

Answers


starkeen February 2016

Try removing the OR condition :

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

Post Status

Asked in February 2016
Viewed 3,277 times
Voted 9
Answered 1 times

Search




Leave an answer