I have some difficulties with mod_rewrite rules. I want to rewrite any request to
www.example.com/dev/*
to
www.example.com
For example, when the request URL is www.example.com/dev/index.php , the response should be www.example.com/dev/index.php , and not only the URL looks like from the root directory, but actually it uses index.php from the root directory.
I tried mod_alias that works
RedirectMatch (^/dev/)(.*) http://www.example.com/$2
But you cannot apply the ip address conditions with mod_alias, so I still need a solution with mod_rewrite.
Can anyone share some knowledge? Thanks.
vicch source share