.htaccess redirection
-
I am trying to redirect all non www incoming posts to www via .htaccess. After installing my blog I used the non www setting for about a month but changed that now and want all incoming links to be redirected.
I′m half way there and have put this .htaccess in my blog folder
RewriteEngine on
RewriteCond %{HTTP_HOST} ^cheap-webhosting.in$
RewriteCond %{REQUEST_URI} ^/blog/$
RewriteRule ^(.*)$ xxhttps://www.cheap-webhosting.in/blog/ [R=301,L]# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule># END WordPress
However, the urls of the specific posts are still not redirecting:
e.g.
https://cheap-webhosting.in/blog/a-transfer-from-one-web-host-to-another/Doesn′t the second line in my .htaccess mean: Redirect everything in the blog directory and everything thereafter to the www version
How can I implement this or have I already done this and what are the possible causes why this isn′t working?
- The topic ‘.htaccess redirection’ is closed to new replies.