How to remove "index.php" from query string? |
[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 |
Messages In This Thread |
How to remove "index.php" from query string? - by El Forum - 10-07-2009, 01:08 AM
How to remove "index.php" from query string? - by El Forum - 10-07-2009, 01:19 AM
How to remove "index.php" from query string? - by El Forum - 10-07-2009, 01:29 AM
How to remove "index.php" from query string? - by El Forum - 10-07-2009, 01:38 AM
|