Reputation: 1125
Working on a codeigniter project, given routes for both english arabic languages. English parameter is working good arabic value cannot be accessed from controller
i have tried this solution in htaccess file rewrite rule by refering to this link but not working
RewriteRule ^([\s\S]*)$ index.php?rt=$1 [L,B,QSA]
$route['^(en|ar)/CarDetails'] = "Car/CarDetails";
English URL:
http://localhost/project/en/CarDetails/car-code
Arabic URL:
http://localhost/project/ar/CarDetails/رمز السيارة
Car Code is a unique code for each car fetched from DB.
I need to fetch this car code in Arabic language as get parameter from browser in my controller so that i can fetch car details based on this code.
Upvotes: 0
Views: 122
Reputation: 133528
Based on your shown samples, could you please try following once, sorry I couldn't test it, should work IMHO though.
RewriteEngine ON
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^project/ar/CarDetails/(.*)/?$ index.php?rt=$1 [L,B,QSA]
Upvotes: 1