0
votes

I'm trying to rewrite all files located below a URL such as:

http://www.example.com/one/

to a new URL:

http://www.newhome.com/new/

So, the desired functionality is to have http://www.example.com/asdf and http://www.example.com/ both remain on www.example.com, but http://www.example.com/one/test/index.php would pull content from:

http://www.newhome.com/new/test/index.php

I can't quite get the correct rewrite rule to do this. Any ideas?

EDIT: The rewrite rule needs to have requests from http://www.example.com/one/* retain the URL in the browser, but pull content from http://www.newhome.com/new/test/* (the rewritten locations will include forms and form submissions).

Of note, the .htaccess file will go in the equivalent of the '/one' directory (because of server access restrictions)

Thank you

1

1 Answers

0
votes

Put this rule as your first rule in your DOCUMENT_ROOT/.htaccess file:

RewriteEngine On

RewriteRule ^one/.*$ /new/test/index.php [L,NC]