2013-04-11 119 views
0

我似乎無法找到如何才達到一個重寫的任何信息重定向到http://localhost:8888/http://loclahost:8888/home/Rewrite_mod重定向HTTP://本地主機/到http://本地主機的/ home/

我想:

RedirectMatch ^/$ http://localhost:8888/website/home/ 

但是,這給了我一個無限循環。

我已經應用了以下規則:

RewriteCond %{REQUEST_URI} home/ 
RewriteRule home/ http://localhost:8888/website/index.php [L] 

RewriteCond %{REQUEST_URI} ([a-z]*)/ 
RewriteRule ([a-z]*)/ http://localhost:8888/website/$1.php 

我得到了這個信息:http://httpd.apache.org/docs/2.4/rewrite/remapping.html#moveddocroot

+0

你有任何其他規則是什麼? – 2013-04-11 09:31:05

+0

我會更新我的問題。 – 2013-04-11 09:34:21

回答

0

我設法用它來工作:

RedirectMatch ^/website/$ http://localhost:8888/website/home/