0
現在我有這個和重寫的index.php到指數如何使用mod_rewrite更改.htaccess中的更多擴展名?
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.])$ $1.php [NC,L]
但我想也該文件名about.html更改至無的.html 我該怎麼做呢?
現在我有這個和重寫的index.php到指數如何使用mod_rewrite更改.htaccess中的更多擴展名?
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.])$ $1.php [NC,L]
但我想也該文件名about.html更改至無的.html 我該怎麼做呢?
看到這個
對於REMOVE .PHP
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
對於REMOVE .HTML
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html
非常感謝! – YouSeeStefan
不可能的。你不會知道,如果它是'.php'或'.html' – colburton
exemple.com/index.php變化exemple.com/index 但我怎麼也改變 exemple.com/about.html到爲例。 com/about – YouSeeStefan
只需刪除'.html'?這與'.htaccess'無關。 – colburton