I am using codeigniter 2.2.0 Version and configured sub domain (*.domainname.in) in my hosting. Below is my .htaccess file content
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
Above .htaccess configuration Works for below Urls
domainname.in ----> domainname.in
www.domainname.in --------> domainname.in
www.pune.domainname.in -----> pune.domainname.in
But when I try to access my auth controller using this URL http://pune.domainname.in/auth
It redirect to below URL with index.php?
http://pune.domainname.in/index.php?/auth
Here is the original domain Url
Can you please suggest why it is happening
Thanks
just put that code in .htaccess file and try it
RewriteEngine On
RewriteBase / businesswale.in/
RewriteCond %{REQUEST_URI} ^system.*
RewriteCond $1 !^(index\.php|images|js|uploads|css|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
Try it
RewriteEngine On
RewriteBase /your_projct_name/
RewriteCond %{REQUEST_URI} ^system.*
RewriteCond $1 !^(index\.php|images|js|uploads|css|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [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.