2015-11-12 82 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

這就是做工精細謝謝 –

相關問題