Hi,
I've implemented a simple .htaccess to rewrite any request on a particular directory.
It works to an extent. If you request with nothing after the trailing slash, then it redirects fine. If you put anything after the trailing slash, it is appended to the end of the URL you're trying to re-direct to.
For example,
- You request:
/dir/
- You redirect to:
/holdingpage.htm
That's fine, however.
- You request:
/dir/index.htm
- You redirect to:
/holdingpage.htmindex.htm
Notice the appended index.htm to the end of the URL.
RewriteEngine on
RewriteCond %{REMOTE_ADDR} !^185\.132\.
RewriteRule ^(.*)$ http://www.example.com/sub/index_rewrite.shtml$1 [R=302,L]
Any help, much appreciated.