301重定向子页面

时间:2014-06-06 10:22:23

标签: regex apache .htaccess mod-rewrite redirect

我想重定向 http://www.polisheddiamonds.co.nz/blog/category4  至 http://www.polisheddiamonds.co.nz/blog

但该网站有html页面,他们已经使用htaccess重定向

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^blog(.*)$ /blog.html?page=$1 [L]

任何帮助将不胜感激

1 个答案:

答案 0 :(得分:0)

你的规则如下:

RewriteEngine On

RewriteRule ^blog/category4/?$ /blog? [L,NC,R]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^blog(.*)$ /blog.html?page=$1 [L]