I have been playing around with this for hours but can't get it right. How do I get from this: domain.com/folder To this: domains.com/forward.php?i=folder I get it working, but it then tries redirecting all my php pages to forward.php too. Is there a way to say don't attempt to forward pages.
My guess is that you have something like this: RewriteRule (.*) forward.php?i=$1 Code (markup): But you need something more restrictive. There are two things that can help you here, firstly anchor the regex and make the character class less accepting. RewriteRule ^([a-zA-Z0-9]+)$ forward.php?i=$1 Code (markup): ...and secondly, use a RewriteCond to make sure you aren't rewriting away from a real file. Put this just before the RewriteRule. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l Code (markup): Either one of these will probably solve your problem. If this still doesn't work, post your current rewrite rules and some example folder names. My post on Apache Regular expressions might also be of some help.