2013-02-01 37 views

回答

1

使用mod_rewrite。例如:

RewriteEngine On 
RewriteBase /testsubdomain/ 
RewriteRule ^(.*)\.php$ http://mysite.ir/users/index.php?domain=testsubdomain&file=$1.php 

詳情點擊這裏:http://httpd.apache.org/docs/current/mod/mod_rewrite.html

+0

它的工作只爲testsubdomain,我要爲每個子域的請求 – Cooper

+0

你檢查的文檔工作?看看'RewriteCond'。 – fbitterlich

+0

是的,但我不知道我有這樣的代碼 RewriteEngine敘述上 RewriteBase/ 的RewriteCond%{HTTP_HOST} ^(。*)\。mysite的\ .IR [NC] 重寫規則^ * $的index.php?域= %1&name = [L] 它的工作,但我不知道如何也得到文件請求 – Cooper

相關問題