I want to redirect a specific page from “example.com/abc/” to “www.example.com/abc” through .htaccess file. How can I do this?
I tried using this code (non-www to www) and it works for me. Hope this can help.
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
//Rewrite to www
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^abc.com/abc[nc]
RewriteRule ^(.*)$ http://www.abc.com/abc/$1 [r=301,nc]
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.