http://www.naissancebebe.com/index.php?fc=module&module=prenoms&controller=search&gender=boy
我想用 .htaccess 重写这个
http://www.naissancebebe.com/boy.php
所以这个查询字符串 "index.php?fc=module&module=prenoms&controller=search&gender=boy"添加到 .htaccess 文件中。
这是我的代码
#RewriteEngine On
RewriteRule ^boy.php /index.php?fc=module&module=prenoms&controller=search&gender=boy [L]
最佳答案
尝试:
Options -Multiviews
RewriteEngine On
RewriteRule ^boy\.php$ /index.php?fc=module&module=prenoms&controller=search&gender=boy [QSA,NC,L]
关于php - 使用 .htaccess 重写 URL(添加查询字符串),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33664075/