0
今年已經透明地重定向請求/file
到/file.php
- 訪問/file
顯示/file.php
。我的.htaccess:硬盤重定向到file.php /文件(當/文件已經被透明地重定向到/file.php)
RewriteEngine on
RewriteBase/
RewriteRule ^([a-zA-Z]+)/?$ $1.php [L]
現在想辦一個硬重定向爲/file.php
到/file
- 如果我打了/file.php
,URL地址欄必須顯示/file
。試過以下,但沒有工作:
RewriteEngine on
RewriteBase/
RewriteRule ^([a-zA-Z]+)\.php$ $1 [R]
RewriteRule ^([a-zA-Z]+)/?$ $1.php [L]
任何幫助嗎?