2016-04-14 43 views
0

我想語義我的網站的網址,但是當我想要展示結果我有一個500錯誤語義網址的.htaccess(錯誤500)

Internal Server Error 
 

 
The server encountered an internal error or misconfiguration and was unable to complete your request. 
 

 
Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error. 
 

 
More information about this error may be available in the server error log. 
 
Apache/2.4.9 (Win32) PHP/5.5.12 Server at localhost Port 80

的代碼的.htaccess

RewriteEngine on 
 

 
RewriteCond %{REQUEST_URI} 10/ 
 
RewriteRule 10/ http://localhost/Cnxkhamsat/admin/edit.php?chi_id=10

有什麼幫助嗎?

回答

0

在本地機器上嘗試時代碼似乎正常工作,這意味着沒有語法錯誤。

最可能的情況是您沒有適當的權限來使用RewriteEngine。這通常發生在使用共享主機時,或者有時使用VPS。

如果你有權訪問你的httpd.conf文件,你很可能會從那裏開啓RewriteEngine。如果您無法訪問它,那麼您可能需要聯繫您的託管服務提供商,並告訴他們您需要他們來允許您使用重寫引擎。

+0

我在localhost工作(Wamp服務器) – sayou

+0

然後看看你的httpd.conf文件。您可能需要啓用mod_rewrites。 https://gist.github.com/jitendravyas/6002804(看看第149行),你可能需要取消註釋 –

+0

我打開了我的httpd.conf,我刪除了這行'#LoadModule rewrite_module modules/mod_rewrite。所以'但沒有改變:'( – sayou