Welcome Guest, Not a member yet? Register   Sign In
about rewrite url in codeigniter
#1

[eluser]Unknown[/eluser]
Hello everybody, i have a question about rewrite url.

My link is:

Code:
http://web.com/index.php/product/show/1

I want to rewrite:

Code:
http://web.com/laptop/1

How can i do that? Thanks for your help
#2

[eluser]cpass78[/eluser]
remove index.php
http://ellislab.com/codeigniter/user-gui...uting.html

reroute
http://ellislab.com/codeigniter/user-gui.../urls.html
#3

[eluser]Unknown[/eluser]
My .htaccess file is;
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

I insert this line into config/routes.php:

Code:
$route['laptop/(:any)'] = "product/show/$1";

not work, what problem is? Thanks
#4

[eluser]danmontgomery[/eluser]
[quote author="mr.hongphuoc" date="1312491112"]not work[/quote]

maybe you can be more specific...?




Theme © iAndrew 2016 - Forum software by © MyBB