I know that following code is required for redirecting a non www link to www link:
`
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.domain\.com
RewriteRule (.*)
http://www.domain.com/$1 [L,R=301]
`
And I have included it too on the main site's .htaccess. But the problem is that I have a gallery in a subfolder.
If I access
http://domain.com/gallery/ it does not get redirected to www version.
I tried including the above code into .htaccess in gallery folder but then it redirects the gallery to site's homepage.
Pls suggest a fix so that non www gallery redirects to gallery having www link.
Comments
`Options +FollowSymLinks`
I'm not super familiar with .htaccess myself but from a quick search on google I found the same htaccess rules you used, but with the code above at the top.
SHould use this code:
`
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.domain\.com
RewriteRule (.*) http://www.domain.com/gallery/$1 [L,R=301]
`
Its just that I am free on holidays and I am working on making my own gallery perfect with ZP in these days.