简体   繁体   中英

.htaccess error internal server 500

I have a problem with my .htaccess :

This code works :

Options +FollowSymlinks
RewriteEngine On
RewriteRule ^classement-triathlon-d1-2016-([^/]*)$ /classement.php?genre=$1 [L]

But when I want add this line :

RewriteRule ^([^/]*)$ /news.php?slug=$1 [L]

I have this error : Internal Server Error

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

Please contact the server administrator, postmaster@mywebsite.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

规则很好,但是您需要在模式中排除点,以使其与重写目标不匹配:

RewriteRule ^([^/.]+)$ /news.php?slug=$1 [L]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM