I would like to have any http://www.mycom/api/* route to the mycom/api/index.php file
RewriteEngine On
#1
RewriteRule ^api/([a-zA-Z]+) /mycom/api/index.php?mode=$1 [QSA,L]
cause Internal Server Error
#2
RewriteRule ^/api/([a-zA-Z]+) /mycom/api/index.php?mode=$1 [QSA,L]
# 3
RewriteRule ^mycom/api/([a-zA-Z]+) /mycom/api/index.php?mode=$1 [QSA,L]
2 and 3 don’t work either
what is the real url for index.php?
http://www.mycom/api/index.php or http://www.mycom/mycom/api/index.php ?
in the first case try this:
if it’s the second
BTW, do you need both the original query string and the mode parameter?