say for instance I have a site with a page being www.domain.com/subdir/main-article yet I have a link pointing to it being www.domain.com/subdirs/main-article how would I change it so visitors clicking on www.domain.com/[B]subdirs[/B]/main-article can go to the correct page www.domain.com/subdir/main-article and avoid the ugly 404 treatment? thaaanks in advance!
(not tested) This is a rewrite for a single file RewriteCond %{HTTP_HOST} www\.domain\.com [NC] RewriteRule ^subdirs/main-article$ /subdir/main-article [R=301,L] Code (markup): If you want to rewrite the path and ALL subdirs and files then the following could help: RewriteCond %{HTTP_HOST} www\.domain\.com [NC] RewriteRule ^subdirs/main-article/(.*)$ /subdir/main-article/$1 [R=301,L] Code (markup):