Welcome Guest, Not a member yet? Register   Sign In
.htaccess problem
#1

[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??
#2

[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";
#3

[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
#4

[eluser]mohsin917[/eluser]
Nobody??
#5

[eluser]RONY Y2K[/eluser]
[quote author="mohsin917" date="1303469423"]Nobody??[/quote]

I gave you the solution. May be you didn't check...
#6

[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
#7

[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?
#8

[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
#9

[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?
#10

[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?




Theme © iAndrew 2016 - Forum software by © MyBB