在项目下添加htaccess
内容如下
<Files htaccess>
deny from all
</Files>
Options Indexes
Options +FollowSymLinks
<IfModule mod_rewritec>
# For security reasons Option followsymlinks cannot be overridden
# Options +FollowSymLinks
# Options +SymLinksIfOwnerMatch
# IndexIgnore */*
RewriteEngine on
# if a directory or a file exists use it directly
RewriteCond %{REQUEST_FILENAME} !f
RewriteCond %{REQUEST_FILENAME} !d
# otherwise forward it to indexphp
RewriteRule ^(*)$ /hangman/indexphp [L]
</IfModule>
以上内容中
RewriteRule后面的/hangman/indexphp 应根据实际填写
试验了好久才成功得有一天晚上突然有灵感虽然灵感失败了但是无意中打开了 另一条道路