CodeIgniter Forums
Hide controller name and method name in 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: Hide controller name and method name in url (/showthread.php?tid=52656)



Hide controller name and method name in url - El Forum - 06-20-2012

[eluser]nahalem[/eluser]
Hi

I'm trying to hide controller name and method in url after anchor click on my website.
How Can I hide controller name and also method name by using these...

My httacces file, it's doesn't show index.php name in url, OK

Code:
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]

my full url name:
Quote:http://www.mywebsite/controller_name/method_name/1

my routes:
Quote:$route['default_controller'] = "controller_name";
$route['controller_name\method_name\:num'] = 'diffrent_name';

pls help me...