snow leopard, mod_rewrite, codeigniter
hay guys, i'm having all sorts of mod_rewirte trouble in snow leopard. Anyone know any decent articles focused on snow leopard and mod_rewrite? Or perhaps a simple step by step guide. What i want to do is setup codeigniter so the urls looks 'pretty'.
so
localhost/~myusername/ci_app/index.php/mycontroller/myaction
would become
localhost/~myusername/ci_app/mycontroller/myac开发者_Go百科tion
thanks
Per CodeIgniter documentation, you should use:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
Try this rule:
RewriteEngine on
RewriteBase /~myusername/ci_app/
RewriteRule ^[^/]+/[^/]+$ index.php/$0 [L]
精彩评论