2015-11-12 83 views
2

http://www.naissancebebe.com/index.php?fc=module&module=prenoms&controller=search&gender=boy重写使用URL的.htaccess(添加查询字符串)

我想这一点使用的.htaccess重写,以这种方式

http://www.naissancebebe.com/boy.php

所以这个查询字符串“的index.php?FC =模块&模块= prenoms &控制器=搜索&性别=男孩”中添加.htaccess文件。

这里是我的代码

#RewriteEngine On 
RewriteRule ^boy.php /index.php?fc=module&module=prenoms&controller=search&gender=boy [L] 
+0

是一个错字? '&gender = boy'?有空间? – roullie

+0

哦,不,它只是错误没有空间 –

+0

什么是你的代码的问题?什么不工作? – starkeen

回答

1

尝试:

Options -Multiviews 
RewriteEngine On 
RewriteRule ^boy\.php$ /index.php?fc=module&module=prenoms&controller=search&gender=boy [QSA,NC,L] 
+0

这就是做工精细谢谢 –

相关问题