0
我只是不明白這一點:RewriteRule是如何工作的?
Options +FollowSymlinks -MultiViews
RewriteEngine on
RewriteBase/
RewriteRule ^([a-z]+\-[0-9]+)/?$ $1/home/ [R]
RewriteRule ^[a-z]+\-([0-9]+)/(home|alone)/?$ /$2.php?id=$1 [L]
RewriteRule ^.*$ http://www.anotherdomain.com/ [R=301]
爲什麼是最後一個規則(按姓氏我的意思是重定向anotherdomain.com)總是被處理?
我需要的是這樣的:
http://mydomain.com/some-344 ---> http://mydomain.com/some-344/home/
http://mydomain.com/some-344/ ---> http://mydomain.com/some-344/home/
http://mydomain.com/some-344/home/ ---> home.php?id=344
http://mydomain.com/some-344/alone/ ---> alone.php?id=344
http://mydomain.com/anythingelse... --> http://www.anotherdomain.com/
的感謝!
哇!這工作正如我預期的!!!,謝謝你的提示。 – coma 2010-08-18 15:33:37