help modrewrite

Posted on 2009-02-18
Last Modified: 2012-05-06
I have

I want it to redirect to  you get the point

the goal here is that when the person goes to it goes to the url but doesn't show the user they are there

on a web host running apache

how can i accomplish
Question by:shankshank
    LVL 27

    Expert Comment

    Are both domains pointing to th same location or are this different accounts?
    LVL 5

    Author Comment

    what do you mean by same location?

    basically i want it toforward to

    I can park or add the second domain as an addon domain in my cpanel
    LVL 27

    Accepted Solution

    Many people set up multiple domains which are pointing to the same location, i.e. /var/www/html/ instead if /var/www/dom1/ for domain1 and /var/www/dom2/ for domain2.

    You can use an internal rewrite if both domains point to the same location. If not, you'll need a reverse proxy setup and the proxy modules to fetch content from domain2 into the scope of domain1 so that the URL in the location bar of the browser doesn't change to domain2.

    The reverse proxy can be set-up with mod_rewrite (p flag - ProxyPass) in a .htaccess file but for full reverse proxying including adjusting location headers, cookie domains and cookie paths, access to the httpd.conf is needed.
    RewriteEngine on
    # matches the root request only, no further resources
    RewriteRule ^$ [P]

    Open in new window


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: HTML5 Specialist

    HTML5 development skills are critical to all developers. HTML5 is the foundation to almost any development process. That's why business, design studios, development shops and other organizations need HTML5 developers. Get your foot in the door as a HTML5 specialist.

    If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
    If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
    In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now