1

I've got few url that need to be redirected, fore example: (site_root)/tag/somethig redirect to root, I'm trying with this but not working

RewriteRule ^(.*)/tag/somethig ./ [R=301,L]

Do site root need to be defined before?

My htaccess:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php ./ [R=301,L]

And I don't what to hardly type domain name, like www.domain.com/xxx, because it on production

4

1 回答 1

0

让你的 .htaccess 像这样:

Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /

RewriteRule ^tag/somethig/?$ / [R=301,L,NC]
RewriteRule ^index\.php$ / [R=301,L,NC]
于 2013-06-28T08:06:53.813 回答