CodeIgniter Forums
Friendly URL - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Friendly URL (/showthread.php?tid=34437)



Friendly URL - El Forum - 09-29-2010

[eluser]Unknown[/eluser]
Hello,
On the begining i am sorry for my english. I will try be correct.
I must beg someone about help with "rewrite" option.
I have adress to controller:
http://127.16.0.1/CodeIgniter_1.7.2/index.php/test/

but it is very ugly address. I never seen these adresses in the net. I rode that i should make .htaccesss file with code:
Code:
<?php
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
?>

and change $config['index_page'] on:
Code:
$config['index_page'] = "";

But when i use new address:
http://127.16.0.1/CodeIgniter_1.7.2/test/

serwer say that it is not exist... Please help me.

Thanks for any help,
Tiregan


Friendly URL - El Forum - 09-29-2010

[eluser]bl00dshooter[/eluser]
Why are there <?php and ?> on your .htaccess? It's not a php file...
Thus, your Rewrite rule needs to be something like this
Code:
RewriteRule ^(.*)$ /CodeIgniter_1.7.2/index.php/$1 [L]



Friendly URL - El Forum - 09-29-2010

[eluser]Unknown[/eluser]
Oh, Thank You good man! It work now!
Only on this forum someone helped me! Thanks.


Friendly URL - El Forum - 09-29-2010

[eluser]bl00dshooter[/eluser]
No problem mate, shall you need more help just ask.