今天在配置域名的时候,发现自己配置的域名,www.z.cn,要访问的是域名是www.z.cn/simple/test/hello,在浏览器输入域名后,给出的提示是:
No input file specified.
这是因为我使用的集成环境是phpstudy。只要我在tp5的public/.htaccess下将代码修改为:
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
</IfModule>
就可以了。这个时候在浏览器上输入:www.z.cn/simple/test/hello就可以访问