• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to remove "index.php" from query string?

#1
[eluser]tanveer[/eluser]
Hi,


I am facing some problems when i try to remove index.php from url.

Here is code of config file.

$config['base_url']= "http://www.mohsanat.edu.pk/";
$config['index_page'] = "";
$config['uri_protocol'] = "REQUEST_URI";

Here is code of htaccess file
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

1) So problem is that when i use these code i got home page just type this http://www.mohsanat.edu.pk/
but when i go any another page after this
http://www.mohsanat.edu.pk/index.php/welcome
it gives the page but when i type this link
http://www.mohsanat.edu.pk/welcome
it does not show page.
2) Also when i use this setting i can not access my admin site here is my admin link
http://www.mohsanat.edu.pk/index.php/admin
but when i use these above setting i can not access my admin site it takes me the front end but i use default setting i can access admin site and remaining site but i also can not access the site from this url
http://www.mohsanat.edu.pk/
also still i can not remove the index.php from url.


Please can anyone help urgently plz.

Thanks in advanced.

Regards,

Tanveer Hussain

#2
[eluser]imn.codeartist[/eluser]
[quote author="tanveer" date="1254917313"]Hi,


I am facing some problems when i try to remove index.php from url.

Here is code of config file.

$config['base_url']= "http://www.mohsanat.edu.pk/";
$config['index_page'] = "";
$config['uri_protocol'] = "REQUEST_URI";

Here is code of htaccess file
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

1) So problem is that when i use these code i got home page just type this http://www.mohsanat.edu.pk/
but when i go any another page after this
http://www.mohsanat.edu.pk/index.php/welcome
it gives the page but when i type this link
http://www.mohsanat.edu.pk/welcome
it does not show page.
2) Also when i use this setting i can not access my admin site here is my admin link
http://www.mohsanat.edu.pk/index.php/admin
but when i use these above setting i can not access my admin site it takes me the front end but i use default setting i can access admin site and remaining site but i also can not access the site from this url
http://www.mohsanat.edu.pk/
also still i can not remove the index.php from url.


Please can anyone help urgently plz.

Thanks in advanced.

Regards,

Tanveer Hussain[/quote]

Try using this

RewriteEngine on
AddType text/x-component .htc



RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]




#RewriteCond %{SERVER_PORT} !^443$
#RewriteRule ^(.*)$ http://www.mohsanat.edu.pk/$1 [R]

see if it is works for you

#3
[eluser]umefarooq[/eluser]
hi check my following post and use the .htaccess file attached in that post it will work nice

http://ellislab.com/forums/viewthread/129429/

#4
[eluser]tanveer[/eluser]
[quote author="dixcoder" date="1254917989"][quote author="tanveer" date="1254917313"]Hi,


I am facing some problems when i try to remove index.php from url.

Here is code of config file.

$config['base_url']= "http://www.mohsanat.edu.pk/";
$config['index_page'] = "";
$config['uri_protocol'] = "REQUEST_URI";

Here is code of htaccess file
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

1) So problem is that when i use these code i got home page just type this http://www.mohsanat.edu.pk/
but when i go any another page after this
http://www.mohsanat.edu.pk/index.php/welcome
it gives the page but when i type this link
http://www.mohsanat.edu.pk/welcome
it does not show page.
2) Also when i use this setting i can not access my admin site here is my admin link
http://www.mohsanat.edu.pk/index.php/admin
but when i use these above setting i can not access my admin site it takes me the front end but i use default setting i can access admin site and remaining site but i also can not access the site from this url
http://www.mohsanat.edu.pk/
also still i can not remove the index.php from url.


Please can anyone help urgently plz.

Thanks in advanced.

Regards,

Tanveer Hussain[/quote]

Try using this

RewriteEngine on
AddType text/x-component .htc



RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]




#RewriteCond %{SERVER_PORT} !^443$
#RewriteRule ^(.*)$ http://www.mohsanat.edu.pk/$1 [R]

see if it is works for you[/quote]

Thank you but still i got the same problem what i do now.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.