我需要關於EasyPHP和.htaccess的幫助。easyphp和.htaccess
.htaccess文件無法正常工作,我認爲它是因爲我沒有設置EasyPHP。
我的EasyPHP版本是5.3.8.1
也許有人知道如何解決這個問題?
.htaccess文件:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^get/([^/]+) /func/get.php?link=$1 [NC]
我需要關於EasyPHP和.htaccess的幫助。easyphp和.htaccess
.htaccess文件無法正常工作,我認爲它是因爲我沒有設置EasyPHP。
我的EasyPHP版本是5.3.8.1
也許有人知道如何解決這個問題?
.htaccess文件:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^get/([^/]+) /func/get.php?link=$1 [NC]
默認安裝的Apache中的EasyPHP不具備激活後才能使用.htaccess文件來修改服務器配置選項文件夾。
您必須告訴Apache可以使用.htaccess文件更改哪些配置以及哪個文件夾。爲了使主Web服務器上的所有配置的變化,你應該修改的http.conf(在Apache/conf文件夾),並查找:
<Directory "${path}/www">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
,改變
AllowOverride None
到
AllowOverride All
要更好地調整它,請閱讀有關AllowOverride的文檔: http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride
此外,檢查的http.conf已mod_rewrite的激活,尋找:
#LoadModule rewrite_module modules/mod_rewrite.so
,並刪除開頭的 「#」
LoadModule rewrite_module modules/mod_rewrite.so
這實際上是正確的答案,但您必須添加它,之後您將不得不重新啓動EasyPhp或至少Apache。 –
這是真的..我想你應該知道任何配置更改都需要重新啓動。感謝您的評論! – vicenteherrera
在本地網站工作當我解決了這個問題,通過添加網站路徑(使用.htaccess)作爲虛擬主機。 Easyphp已經爲此提供了一個模塊:'虛擬主機管理器'。這將自動處理httpd.conf。
你到底是怎麼做到的?請發佈實際解決方案 –
是mod_rewrite啓用嗎?它是否允許覆蓋所有? –