WordPress.org

Forums

htaccess rewrite subdomain to WP page (4 posts)

  1. ChimpanzeeUK
    Member
    Posted 2 years ago #

    Hi all. Firstly, my apologies. I know this question isn't specific to WP but after hours of Googling I can't find the answer anywhere so I'm hoping another WP user has had to do something similar.

    I have created a page which is located, for example, at http://website.com/foopage/. I'm trying to find out what I need to do in my .htaccess file so that when a visitor goes to http://bar.website.com they see http://website.com/foopage/. I have a straight-forward redirect at the moment but I would like the address bar to continue to show http://bar.website.com while viewing the page

    http://website.com/foopage/ is a standalone, single page and nothing else will use bar.website.com subdomain.

    Thanks in advance.

    Edit: I used example URLs for the sake of simplicity but if you're interested, the real URL is http://qsday.rocketcheetah.com

  2. Pioneer Web Design
    Member
    Posted 2 years ago #

    This is commonly done with a 301 redirect in .htaccess, review this on the PHP forums or stackexchange has much code to look at...

  3. ChimpanzeeUK
    Member
    Posted 2 years ago #

    Hi Seacoast. As I mentioned, I have a redirect in-place at the moment but where I'm having trouble is in making the address bar keep the subdomain URL. A 301 redirect doesn't do this.

  4. Pioneer Web Design
    Member
    Posted 2 years ago #

    The address bar will not need the the redirect (when done properly)

Topic Closed

This topic has been closed to new replies.

About this Topic