简体   繁体   English

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

[英]Extra index.php ? added in Url

I am using codeigniter 2.2.0 Version and configured sub domain (*.domainname.in) in my hosting. 我在主机中使用codeigniter 2.2.0版本和配置的子域(* .domainname.in)。 Below is my .htaccess file content 以下是我的.htaccess文件内容

RewriteEngine on

RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

Above .htaccess configuration Works for below Urls .htaccess之上的配置适用于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 但是当我尝试使用此URL http://pune.domainname.in/auth访问我的身份验证控制器时

It redirect to below URL with index.php? 它使用index.php重定向到下面的URL

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 只需将该代码放在.htaccess文件中并尝试

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]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM