.htaccess problem |
[eluser]mohsin917[/eluser]
Hello guys. I have index file admin.php. I want to remove .php form it. I use htaccess in CI 7.2 and it works fine regarding that version. But in CI 2.0 its not working. Also I implement following http://ellislab.com/forums/viewthread/180566/ and http://ellislab.com/forums/viewthread/180960/ but results are the same... nothing happen... my application shows this page not found error any idea??
[eluser]RONY Y2K[/eluser]
I tried by this changes in codeigniter 2.0 version, its work fine... Please use this steps: In .htaccess <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^system.* RewriteRule ^(.*)$ /index.php?/$1 [L] RewriteCond %{REQUEST_URI} ^application.* RewriteRule ^(.*)$ /index.php?/$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L] </IfModule> In config.php file: $config['uri_protocol']="REQUEST_URI";
[eluser]mohsin917[/eluser]
I just have to remove .php from admin.php .... admin.php/users/add to admin/users/add not have to remove index.php it is working for index.php.. but having problem for admin file. and one thing more.. did we have to place this file in system directory.. because at root it throw me out
[eluser]RONY Y2K[/eluser]
[quote author="mohsin917" date="1303469423"]Nobody??[/quote] I gave you the solution. May be you didn't check...
[eluser]mohsin917[/eluser]
[quote author="RONY Y2K" date="1303552375"][quote author="mohsin917" date="1303469423"]Nobody??[/quote] I gave you the solution. May be you didn't check...[/quote] Dude i told you that your solution is working for removing index.php.. that is not my problem. the thing which is disturbing me is else... i just want to remove .php
[eluser]RONY Y2K[/eluser]
[quote author="mohsin917" date="1303553174"][quote author="RONY Y2K" date="1303552375"][quote author="mohsin917" date="1303469423"]Nobody??[/quote] I gave you the solution. May be you didn't check...[/quote] Dude i told you that your solution is working for removing index.php.. that is not my problem. the thing which is disturbing me is else... i just want to remove .php[/quote] ok fine, can you share your config file configuration here? I am using like: http://localhost/codeigniter/blog/view, do you want like this?
[eluser]mohsin917[/eluser]
actually i have this kind of url http://localhst/mysite/admin.php/user_manage/addnew i want this below url http://localhost/mysite/admin/user_manage/addnew
[eluser]toopay[/eluser]
[quote author="mohsin917" date="1303402403"]I use htaccess in CI 7.2 and it works fine regarding that version. [/quote] How your past htaccess looks like?
[eluser]RONY Y2K[/eluser]
[quote author="mohsin917" date="1303553710"]actually i have this kind of url http://localhst/mysite/admin.php/user_manage/addnew i want this below url http://localhost/mysite/admin/user_manage/addnew[/quote] did you change the index.php file name from codeigniter folder to admin.php? can u please show ur config.php file code? |
Welcome Guest, Not a member yet? Register Sign In |