0

Lets say i have wildcard subdomains on an external domain, can be anything like

demo.site1.com

blah.site1.com

and have directories like these on an external websites

external.com/websites/demo.site1.com

external.com/websites/blah.site1.com

and i want to make it so that all requests for lets say demo.site1.com should rewrite to

external.com/websites/demo.site1.com if the subdirectory matches demo.site1.com

NO REDIRECTION, I MUST KEEP THE URL THE SAME...

I have to do this for multiple subdomains with the same kind of subdirectories.

Is it possible to do?? if not is it possible without matching???

I read the apache .htaccess docs over and over for the past 12 hours and can't seem to

figure out a way how to do it.

Your help will mean alot to me...

2 Answers2

0

You should configure Your domain in domain administration panel to point at this addresses.

If You don't have access to them use iframe, but as far I know .htaccess doesn't provide this kind of functionality.

Gustek
  • 3,680
  • 2
  • 22
  • 36
0

try this. put it inside htaccess on site1.com document root. it work only if both domain has permission to access together

 RewriteEngine On
 RewriteCond %{HTTP_HOST} ^(.*)\.site1.com/(.*)$
 RewriteRule ^(.*)$ external.com/websites/$1.site1.com/$2 [L]
mohammad mohsenipur
  • 3,218
  • 2
  • 17
  • 22