CodeIgniter Forums
apache rewrite lose effectiveness under CI? - 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: apache rewrite lose effectiveness under CI? (/showthread.php?tid=54799)



apache rewrite lose effectiveness under CI? - El Forum - 09-25-2012

[eluser]Unknown[/eluser]
Hi everyone,

I want to rewrite code for codeigniter url rewrite recently,

i used fllow code

Code:
RewriteEngine on
RewriteBase /test
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /test/index.php/$1 [NC,L]
RewriteRule ^list/shows/cid-([0-9]+).html /list/shows?cid=$1 [NC]

'test' is my website dir

It is working well for index.php removal. But it doesn't work for url rewrite.(404 not found)

i want make http://example.com/test/list/shows?cid=1

become

http://example.com/test/list/shows/cid-1.html

Thanks in advance.

so is this a bug or ?

please help me ,tks~~