views:

73

answers:

1

I have a need to rewrite all URLs except /admin/ to index.html. How would I achieve that with .htaccess? I know I need RewriteConds and writes, but everything I have tried ends up in 500 Internal Server Error.

+2  A: 

Make sure that you also exclude the target. Try this mod_rewrite rule:

RewriteEngine on
RewriteRule !^(admin/|index\.html$) /index.html [L,R]
Gumbo
Seems to work great!
rFactor