i can redirect my subpages but can not redirect pages in folders ( http : //site.com/page.html to http : //www . site.com/page.html ) with using this lines; RewriteCond %{HTTP_HOST} ^site\.com [NC] RewriteRule ^(.*) http://www. site.com/$1 [R=301,L] PHP: but, in one of my directory, i cant do that. Can you help me to redirect my pages to WWW address ( site.com/folder/page.html to www . site.com/folder/page.html) ?
Try: RewriteCond %{HTTP_HOST} ^site\.com$ RewriteRule ^(.*)$ http://www.site.com/$1 [R] Code (markup):
RewriteCond %{HTTP_HOST} ^site\.com$ RewriteRule ^(.*)$ http://www.site.com/dir/$1 [R=301,L] PHP: there was another htaccess file in my /dir/ folder, i think that caused the problem. i added the lines above and fixed the problem, thanks.