Solved

.htaccess page load different URL

Posted on 2009-07-03
3
453 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 500 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Technology Resume 7 88
Obsolete font tag need to convert to CSS 3 54
calculate days away 11 61
Selenium WebElement Login button findElement 9 14
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

732 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