gpt4 book ai didi

php - 使用 .htaccess 重写 URL(添加查询字符串)

转载 作者:行者123 更新时间:2023-11-28 01:21:51 25 4
gpt4 key购买 nike

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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com