Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

http redirection

Posted on 2009-07-15
5
Medium Priority
?
200 Views
Last Modified: 2012-05-07
Hi ,

I am  planning to phase out my previous url www.mydomain.com/mypage and replace it by myplace.com

I have a rewrite rule in the virtual host configuration file of myplace as below:

RewriteEngine   On
RewriteRule     ^/(.*)  http://www.mydomain.com/mypage [R]

Now, whenever I type myplace.com in the browser, it fetches the web pages from www.mydomain.com/mypage properly. It does its job...

but the problem over here is, it also at the same time changes URL in the address bar of the browser to www.mydomain.com/mypage.

I simply want pages to be fetched from www.mydomain.com/mypage whenever I type mypage.com. I don't want any changes in URL of the browser. How do I avoid it ??
0
Comment
Question by:its_ns_04
[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
  • 2
  • 2
5 Comments
 
LVL 12

Expert Comment

by:kevin_u
ID: 24866706
The [R] causes a redirect, which tells the browser to go to the new url, hence it changes the address bar.

Since your virtual host probably needs mydomain.com in the request headers, a redirect is probably required, and there is no easy fix.   However, if both domains are on the same virtual host, you may be able to do rewrite rules that just direct it to the new content (with out the [R], but also more importantly with out the domain name) that might reside in a different directory.

0
 
LVL 1

Author Comment

by:its_ns_04
ID: 24869769
hmm.. I tried without [R] too...but it is not helping me...

do u have any clues on how to fix it ?
0
 
LVL 12

Accepted Solution

by:
kevin_u earned 1500 total points
ID: 24875244
The only other solution available to you is to redirect mydomain.com to mydomain.com/framepage.html.  Then framepage.html would be a full screen frame totally encapsulating myplace.com.  The address bar remains as mydomain.com/framepage.html (or whatever more inocuous name you'd like to call that page)
0
 
LVL 8

Expert Comment

by:allen-davis
ID: 24884978
I believe you can do what you want by using the proxy functionality of mod_rewrite.  Try changing the [R] for redirect to a [P] for proxy and see what happens.  I'm not sure if you need to add a few more tweaks or not.

take a look at this link for a bit more info:

http://httpd.apache.org/docs/1.3/misc/rewriteguide.htmlhttp://httpd.apache.org/docs/1.3/misc/rewriteguide.html
0
 
LVL 1

Author Closing Comment

by:its_ns_04
ID: 31603991
solution not totally clear
0

Featured Post

Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

Question has a verified solution.

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

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

610 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