简体   繁体   中英

Trailing slash remove bug with htaccess and apache server

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} ^(.*)/(.*)/exam$
RewriteRule ^(.*)/(.*)/exam$ exampage.php?vname=$1&ecode=$2 [L]

i want URL like "mysite.com/hp/000-120/exam" but the above code is not working can any body help?

您可能仅需采取以下行动即可:

RewriteRule ^/?([^/]+)/([^/]+)/exam$ exampage.php?vname=$1&ecode=$2 [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