douwang6635 2014-10-21 17:39
浏览 9

额外的index.php? 在网址中添加

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

  • 写回答

2条回答 默认 最新

  • duanmei1850 2014-10-21 17:49
    关注

    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]
    
    评论

报告相同问题?