3
我使用mod_rewrite在我的站點 中獲取虛擬子域作爲變量,並且希望添加一條規則以隱藏index.php和所有變量網址 但無法讓它工作。有什麼建議嗎? 這是我實際的.htaccess:隱藏index.php和url中的所有變量
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.mysite\.com$
RewriteCond %{HTTP_HOST} ^(.*)\.mysite\.com$
RewriteRule ^$ /index.php?member=%1 [P,L]
我已經添加了子域*指向根目錄已經是入門做到這一點,它工作正常。我只是想隱藏所有那些長長的網址... – user985419
你能舉個例子嗎? –
讓我們說:johnsmith.mysite.com指向mysite.com/index?member=johnsmith,對吧?但是URL變化johnsmith.mysite.com/index?member=johnsmith我想的網址是公正johnsmith.mysite.com所有的時間... – user985419