在項目下添加.htaccess
內容如下:
<Files .htaccess>
deny from all
</Files>
Options -Indexes
Options +FollowSymLinks
<IfModule mod_rewrite.c>
# 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 index.php
RewriteRule ^(.*)$ /hangman/index.php [L]
</IfModule>
以上內容中
RewriteRule 後面的 /hangman/index.php 應根據實際填寫
試驗了好久才成功得,有一天晚上突然有靈感,雖然靈感失敗了,但是無意中打開了 另一條道路