Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

.htaccess page load different URL

Posted on 2009-07-03
3
Medium Priority
?
455 Views
Last Modified: 2015-01-05
Hi guys,

Wondering if you can shine some light a problem I am having... Something Id like to do...

Id like to have
http://abc.domain1.com.au -> point to -> http://www.domain2.com.au/abc

But I dont want have the URL change, I want it to stay as http://abc.domain1.com.au even though it is loading content from http://www.domain2.com.au/abc. So you would never see: http://www.domain2.com.au/abc or know that it is loading this URL.

Is this possible?

Ive tried playing the dynamic sub domains, DNS settings... and think the possible solution would be use to utilize a .htaccess file... but don't know how to code it...

hope someone can provide some working code to resolve this problem...

Thanks!
0
Comment
Question by:dev09
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 17

Expert Comment

by:selvol
ID: 24771905
0
 

Author Comment

by:dev09
ID: 24782155
Thanks, I've tried... the code...

RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} domain2.com
RewriteCond %{REQUEST_URI} !/abc
RewriteRule ^(.*)$ abc/$1 [L]

but it doesn't seem to want to work..  Can someone please test this for me?
on another domain and let me know how it goes...

Thanks!
0
 
LVL 7

Accepted Solution

by:
stephenhoekstra earned 2000 total points
ID: 24938910
there is probably a better way, but what you can do is create vhosts for the subdomains and put a .htaccess in each containing the line
RedirectMatch ^/$ http://www.domain2.com.au/abc

that'll redirect and be transparent to your users.

if both domains are hosted locally you could use
RewriteEngine on
RewriteRule   ^/$  /path/to/domain2.com.au/abc


http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
The viewer will learn how to count occurrences of each item in an array.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question