Hi, I had some of my urls indexed in google search engine incorrectly. For example google indexed this url http://www.somedomain.com/category/123/ when correct url was http://www.somedomain.com/category/123/index.html When visitors click on these incorrect urls they are taken to the home page instead of the category page. How can I setup a redirect on my htaccess file for all urls ending with the pattern /category/(*.)/$ to /category/(*.)/index.html I have the following entry in the .htaccess file <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^(.*)$ index.php [QSA,L] </IfModule> Thanks Patrick
<IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^category/(.*)/$ http://www.example.com/category/$1/index.html [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^(.*)$ index.php [QSA,L] </IfModule> Code (markup):