.htaccess 重写会产生404错误
我需要重写一个url从这个 对此 代码是这样的.htaccess 重写会产生404错误,.htaccess,mod-rewrite,.htaccess,Mod Rewrite,我需要重写一个url从这个 对此 代码是这样的 RewriteCond %{REQUEST_URI} ^/stand-carros-usados [NC] RewriteCond %{QUERY_STRING} ^brand=(.*)&model=(.*)&category=(.*)&fuel=(.*)&kms=(.*)&price=(.*) RewriteRule ^(.*)$ https://www.domain.tld/stand-carros-
RewriteCond %{REQUEST_URI} ^/stand-carros-usados [NC]
RewriteCond %{QUERY_STRING} ^brand=(.*)&model=(.*)&category=(.*)&fuel=(.*)&kms=(.*)&price=(.*)
RewriteRule ^(.*)$ https://www.domain.tld/stand-carros-usados/alfa-romeo? [L]
url正在更改我想要的,但它给了我404页?
有人知道为什么吗
编辑
这是我的.htaccess文件。有点梅西,因为谁创造的并不在乎
RewriteEngine On
RewriteCond %{HTTPS} off
# First rewrite to HTTPS:
# Don't put www. here. If it is already there it will be included, if not
# the subsequent rule will catch it.
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Now, rewrite any request to the wrong domain to use www.
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteRule ^pt/(.*)$ http://%{HTTP_HOST}/$1 [L,R]RewriteCond %
{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^viaturas(.*)$ https://%{HTTP_HOST}/stand-carros-usados$1 [R=301,L]
RewriteRule ^automoveis(.*)$ https://%{HTTP_HOST}/stand-carros-usados$1 [R=301,L]
RewriteRule ^print/([a-zA-Z0-9_-]+)?$ ajax/printcar.php?id=$1 [L]
RewriteRule ^process-order/([a-zA-Z0-9_-]+)?$ process-order.php?h=$1 [L]
RewriteRule ^([^\.]+)?$ index.php?section=$1 [L]
RewriteRule ^eng/([^\.]+)?$ index.php?section=$2 [L]
RewriteRule ^eng?$ index.php [L]