Reputation: 53
I have return the below htaccess rule for actual URL http://apis.jaspee.com/services/srvcRest.php?rqst=getCMS
RewriteRule ^(.*)$ services/srvcRest.php?rqst=$1 [QSA,NC]
but it works as
http://apis.jaspee.com/services/srvcRest.php?rqst=services/getCMS
because of that the page is redirected to page not found page. $1 fetch the value as services/getCMS but I want the $1 should fetch the value as getCMS only.
Upvotes: 1
Views: 28
Reputation: 987
If its going in root /.htaccess, try:
RewriteCond %{REQUEST_URI} !^.*/srvcRest\.php$ [NC]
RewriteRule ^services/(.*)$ services/srvcRest.php?rqst=$1 [QSA,NC]
If its going in /services/.htaccess, try:
RewriteCond %{REQUEST_URI} !^.*/srvcRest\.php$ [NC]
RewriteRule ^(.*)$ srvcRest.php?rqst=$1 [QSA,NC]
Upvotes: 1