开发者

error handling and search engines

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]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜