I'm trying to use URL rewriting with htaccess, it works on local but failed on production. My host is 1and1.
My url is :
https://website.com/service.php?id=100&title=page-title
and I would like
https://website.com/service/100/page-title.html
I use this in my .htaccess
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteRule ^service/([^/]*)/([^/]*)\.html$ /service.php?id=$1&title=$2 [L]
Any idea about this error ?
I found the error, need to add Options -MultiViews
in .htaccess
Thx
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.