可能重複:
How to redirect all requests to index.php and keep the other GET params?
Rerouting all php requests through index.php如何爲一組路徑調用特定的PHP腳本?
假設我們有/var/www/someapp/index.php
腳本。現在,我們怎樣才能使Apache服務器發送所有喜歡
http://somedomain.info/someapp/alpha
http://somedomain.info/someapp/beta
http://somedomain.info/someapp/beta/gamma
http://somedomain.info/someapp/epsilon/omega
...到非常index.php
腳本網址的請求的,以及我們如何能夠從PHP腳本中檢索完整的路徑?
請參閱[StackOverflow常見問題](http://stackoverflow.com/faq),特別是關於[不要問什麼](http://stackoverflow.com/faq/#dontask)的部分,即:* 「如果你可以想象一整本書可以回答你的問題,那麼你的問題就太多了。」* – orourkek 2012-08-15 22:27:43
此外,這是[this]的重複(http://stackoverflow.com/questions/9694118/rerouting-all- php-requests-through-index-php),[this](http://stackoverflow.com/questions/3776714/htaccess-rewriting-all-requests-to-a-single-controller?rq=1),[this ](http://stackoverflow.com/questions/5214502/how-to-redirect-all-requests-to-index-php-and-keep-the-other-get-params)和[this](http: //stackoverflow.com/questions/2669258/redirect-everything-to-index-php),名稱*只有幾個* ... – orourkek 2012-08-15 22:30:50
[這裏有幾十個更多](https://www.google.com/search q =站點%3Astackoverflow.com +重定向+〜+所有子目錄〜+至+〜+單文件),如果任何人有興趣。 – orourkek 2012-08-15 22:40:27