DirectoryIndex /home.php
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^product/([0-9]+) product.php?id=$1&product_name=$2 [L,QSA]
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*?)/?$ $1.php [NC,L]
ErrorDocument 404 /404.php
ErrorDocument 403 /403.php
当我使用1个参数尝试使用它时,我拥有此.htaccess文件,但使用2个参数则不起作用,并且我想将此product.php?id = 1&p_name = exmpl链接转换为具有以上代码的product / 1 / exmpl我必须用手来写这个产品/ 1 /示例