Welcome Guest, Not a member yet? Register   Sign In
url rewriting problem
#1

[eluser]Unknown[/eluser]
Hello,
I have a little problem with url rewrite on CodeIgniter.
Here is the situation :

I have a link on my website www.site.com/eng/about/

eng is the controller and about is the view.

Now i want using url rewrite to have that :
when i type www.site.com/eng/test/ go to www.site.com/eng/about/

here is my .htaccess file
Code:
RewriteEngine on
Options Indexes FollowSymlinks Multiviews
RewriteBase /

RewriteRule eng/test/ eng/about/ [L]

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


but when i try i get a 404 not found error.
Could someone please tell me where i'm wrong ?

Thank you .
#2

[eluser]appleboy[/eluser]
You don't need to modify .htaccess, please modify application/config/route.php

Code:
$route['eng/test'] = "eng/about";
#3

[eluser]osci[/eluser]
appleboy is correct.

You have a controller named eng?? and when you want french you'll make one fra??? and the story will go on????
You had better search these forums for multilingual - I've been using wiredesingz's URI Language Identifier. It will make your life easier in the long run.




Theme © iAndrew 2016 - Forum software by © MyBB