how to do URL Rewriting in codeigniter |
[eluser]ssrawat[/eluser]
Hi, I am using codeigniter and i want to rewrite url through htaccess so please anyone know how can we do it? Please help me....and give me reply on my email id[email protected] Thanks in advance..
[eluser]ssrawat[/eluser]
Hi, Thanks for your post. But this is not exactly what I want. I m already using RewriteCond $1 !^(index\.php|images|robots\.txt|css) RewriteRule ^(.*)$ index.php/$1 [L] My problem is, I want to run something like RewriteRule ^([a-z,0-9,-]+)/([0-9]+)/$ /index.php?/get_page/$2 [L] along with the codes mentioned above by you. get_page is a function on home controller, i want $2 be passed on this function. Is this possible on codeigniter environment to have our own rules like we do in core php. I tried but the above code is not working.
[eluser]Aken[/eluser]
No need to post the same problem in multiple areas of the forum. A solution has been added to your other thread, check it out.
[eluser]Unknown[/eluser]
codeigniter project not working in wamp server....When i try to run the project it shows Internal Server Error..Please help to solve this
[eluser]Genuine Scope[/eluser]
RewriteEngine on RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] If you are not using a virtual host then mention folder name as follows RewriteEngine on RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ project_folder/index.php/$1 [L,QSA] |
Welcome Guest, Not a member yet? Register Sign In |