0
是否有任何URL重寫以反向方式工作的可能性。URL向後改寫
通常重寫URL以這種方式,
http://somedomain.com/something
爲http://somedomain.com/something.php
但是,如果我嘗試^something.php ./something [NC,L]
我得到一個錯誤「服務器錯誤」
我如何能實現呢?
是否有任何URL重寫以反向方式工作的可能性。URL向後改寫
通常重寫URL以這種方式,
http://somedomain.com/something
爲http://somedomain.com/something.php
但是,如果我嘗試^something.php ./something [NC,L]
我得到一個錯誤「服務器錯誤」
我如何能實現呢?
RewriteRule的第二個參數不能有./
,它必須是絕對的。試試這個:
RewriteRule ^something\.php$ /something [NC,L]
你想重寫http://somedomain.com/something => http://somedomain.com/something.php?既然你說你想要倒退? – reikyoushin 2013-05-06 15:34:46
沒有somedomain.com/something.php somedomain.com/something – 2013-05-06 15:39:34