2013-02-17 88 views

回答

0

创建.htaccess文件,并把这个在它:

RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME}\.php -f 
RewriteRule ^(.*)$ $1.php 

这样,网址,如domain.com/blog,它会悄悄地追加.php的文件名(即加载blog.php)。

+0

不要工作..:/ – 2013-02-17 21:24:28

+0

@JoãoPlus“不要工作”没说什么。请解释为什么它不起作用。你有没有遇到错误,规则不适用,什么? – 2013-02-17 22:45:49

+0

该规则未应用。我做了什么Supericy说,但当试图去索引它不显示文件index.php。错误是通常的404。 – 2013-02-18 21:28:44

相关问题