(I might be an idiot, it appears that .htaccess isn’t enabled by default in Apache on OSX.)
I know there are a lot of mod_rewrite questions out there, but I just can’t get mine right and nothing else seems to quite cover it.
All I want to do is redirect
www.url.com/something
or
www.url.com/something/anything/more
to
www.url.com/index.php?values=something
or
www.url.com/index.php?values=something/anything/more
Nothing fancier than that (I’ll put in something about ignoring gif/jpg/png, adding www. etc later later) – all processing of something/anything/more will be done in PHP.
I just can’t get it right though. Any hints/resources or anyone who’s just managed to do this? It’s more frustrating knowing that I once got it absolutely perfect but lost that code years ago.
This is pretty straightforward, at least in what you are asking But basically you need to make index.php passthrough (so you don’t rewrite index.php to index.php), then the main rewrite.
Add whatever conditions you want to exclude rewrite at the
# your conditions herespot