看着50+的StackOverflow職位,盡我htaccess文件的許多排列後,它什麼都不做還。
我曾嘗試
使用本網站生成我htaccess文件:http://www.generateit.net/mod-rewrite/
在我的httpd.conf文件中設置了AllowOverride所有和重啓動Apache。
MY CURRENT htaccess文件
住在根目錄下。
RewriteEngine On
RewriteBase/
RewriteRule ^find-a-local-doctor/([^/]*)/([^/]*)$ /find-a-local-doctor/?state=$1&city=$2 [L]
什麼,我想完成
更改此網址: http://www.md1network.com/find-a-local-doctor/?state=FL&city=Tampa
要這樣: http://www.md1network.com/find-a-local-doctor/FL/Tampa
進行追加
由於正在做這項工作的實際文件是:http://www.md1network.com/find-a-local-doctor/index.php,我需要能夠使用PHP解析查詢字符串。希望我仍然能夠做到這一點,以獲得國家和城市。
請幫忙。 謝謝。
看起來很好,你現在面臨的問題到底是什麼。請說清楚。 – anubhava
當我去http://www.md1network.com/find-a-local-doctor/?state=FL&city=Tampa時,url不會按照我想要的方式重寫。它什麼也沒做。 –