我正在尝试设置新站点的htaccess文件。当前文件如下所示:
RewriteEngine On
RewriteCond %{QUERY_STRING} ^option=com_content&task=view&id=48&Itemid=64$
RewriteRule ^(.*)$ /prodotti-moto-go-kart/accessori-personalizzazione-moto-go-kart/utensili-moto-go-kart? [R=301,L]
RewriteCond %{QUERY_STRING} ^option=com_content&task=view&id=67&Itemid=83$
RewriteRule ^(.*)$ /prodotti-moto-go-kart/accessori-personalizzazione-moto-go-kart/abbigliamento-tecnico-moto? [R=301,L]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value max_execution_time 600
php_value max_input_time 600
奇怪的是,option = com_content&task = view&id = 67&Itemid = 83的规则正常运行,而option = com_content&task = view&id = 48&Itemid = 64的规则无效(我收到404错误)。他们不一样吗?
甚至更陌生的事实是,如果我复制第二个字符串并在其中插入第一个规则字符串,它将起作用!
我需要弄清楚这一点,因为重写规则将不止两个。