access 配置文件 request link writer all 一行 php5 err
Apache:
1. httpd.conf配置文件中加载了mod_rewrite.so模块
2. AllowOverride None 将None改为 All
3. 把下面的内容保存为.htaccess文件放到应用入口文件的同级目录下
- <IfModule mod_rewrite.c>
- Options +FollowSymlinks -Multiviews
- RewriteEngine on
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
- </IfModule>
PHP5.5以上
[Apache]规则这一行:
- RewriteRule ^ (. * ) $ index.php / $1[QSA, PT, L]
会导致报错:
- No input file specified
需要修改成:
- RewriteRule ^ (. * ) $ index.php[L, E = PATH_INFO: $1]
;
thinkphp5, 省略index.php
来源: http://www.bubuko.com/infodetail-2381184.html