There are two predefined URLs which I want to redirect to default controller's method and return default responses. URLs are:
URL 1:
http://EnrollmentService.mydomain.com/EnrollmentServer/Discover.svc
(GET request)URL 2:
https://EnrollmentService.mydomain.com/EnrollmentServer/Discover.svc
(POST request)
I tried adding following to .htaccess
file but no luck.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /testsaav/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
Redirect /enrollmentserver/Discover.svc http://localhost/projectname/
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
Right now I am trying to redirect http://localhost/projectname/EnrollmentServer/Discover.svc
to default controller's index method.
I have created a project with default controller name enrollmentserver.php
but when I tried to access http://localhost/projectname/enrollmentserver
, I got Object not found error
How would redirect both the urls to default controller's any method?