I have just changed my page structure from
eg
/my_page.php
to
/my_page/
but now all cached pages on search engines gives 404..
how can I handle them? is it possible to redirect all 404 to directly to the domain www.domain.com
and in the same tiem send back a 301 redirect to the search eng开发者_StackOverflowine?
Try the following in htaccess (if available) or the virtual host's config:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*\.php$ /$1/[R=301,L]
精彩评论