Forum Moderators: phranque
Both the two domains are hosted on two different servers or machines.
I have tried this on .htaccess file in domain1, but no result.
RewriteEngine ON
RewriteCond %{REQUEST_URI} /aboutus.php
RewriteRule ^/aboutus.php$ [domain2.com...]
:(
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^aboutus\.php$ https://www.domain2.com/aboutus.php [R=301,L]
RedirectMatch 301 ^/aboutus\.php$ https://www.domain2.com/aboutus.php
You may not need the first line in the mod_rewrite code -- Try it with and without the Options directive.
I note that you're redirecting to a secure connection (https), which also affects the methods you can use.
Jim
I'm getting a 404 error. I have tried both the methods.
I want to make use of the files in server1(www.domain1.com)
for (ne.domain2.com)server2.
for eg:-
from (ne.domain2.com)server2, if i request
[ne.domain2.com...] the file should be
from server1(http://www.domain1.com/aboutus.html) but the
address bar should show [ne.domain2.com...]
:-(
RewriteEngine ON
RewriteRule ^aboutus\.html$ [domain1.com...] [R=301,L]
Redirecting, but the address bar also changes to
[domain1.com...]
i dont want this to happen. I want the address bar to show
[ne.domain2.com...]
:-(
Its working perfectly as i expected.
But if i tried to use
^localpath(.*) [otherhost...] [P]
it throws an internal server error.
How could i do this on secured server?