Forum Moderators: phranque
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^domain\.com
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
</IfModule>
Now I want to rewrite all pages generated by wordpress (ex. www.domain.com/page1; www.domain.com/category/page1) to pages with / at the end of them, because of dup. content issues. However, I do not want to rewrite real files, like wp-admin.php or wp-login.php, and basically all phisical files on server. Just those already rewritten. Actually just 301 redired from page to page/ will be great, again w/o having any affection to phisical files.
I hope I was clear.
Thank you in advance,
Manca
You can use RewriteCond %{REQUEST_FILENAME} -f
to check for file exists. Or you can use
You can use RewriteCond %{REQUEST_FILENAME} !-f
to verify that the file does not exist.
You can use the pattern of the RewriteRule to test the requested local URL_path.
For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].
Jim