Forums

WordPress + htaccess = help please! (8 posts)

  1. impactphoto
    Member
    Posted 1 year ago #

    Hi folks
    I'd appreciate some good advice.

    I have two wordpress installations. Lets call one siteA which is in my ISP's Linux server root directory. Lets call the second siteB, which is in a subdirectory of the same server called siteB.

    Actual structure is:=
    http://www.siteA.com
    http://www.siteA.com/siteB/

    I own two domain names siteA.com and siteB.com. I want people to use the address http://www.siteB.com when accessing everything on siteB, not http://www.siteA.com/siteB/.

    I want to leave the "real" siteA alone!

    I have been assured this can be done using the .htaccess file, but I've failed so far!
    I have managed to "mask" the home page of siteB using the features of my ISP's cPanel interface, but it reverts back to http://www.siteA.com/siteB/ once you move away from the home page.

    All I want is to mask the http://www.siteA.com/siteB/ with http://www.siteB.com/ ......

    I hope this makes sense and someone can suggest a way forward for me (rewrite rules were mentioned by someone).

    Thanks for reading this far!

  2. impactphoto
    Member
    Posted 1 year ago #

    PS the addresses "siteA" and "siteB" are just examples, but the process of posting the request turned them into formatted addresses - ho hum!

  3. You'd be better off mapping a domain to siteb via DNS really. (Don't worry, we know SiteA/B is an example ;) )

    I have managed to "mask" the home page of siteB using the features of my ISP's cPanel interface, but it reverts back to http://www.siteA.com/siteB/ once you move away from the home page.

    Is siteB a wordPress site? If so, is it set up with the URLs as SiteB.com or SiteA.com/SiteB?

  4. impactphoto
    Member
    Posted 1 year ago #

    Hi Ipstenu & thanks for your advice!

    Yes, I overlooked DNS as a possibility - will check today.
    Both my sites, SiteA and SiteB are wordpress sites. On SiteB, currently, both WordPress URL and WordPress Site address URL are set to SiteA/SiteB.

    Can I change either of these values to SiteB only, or will this be followed by the "whizz-bang" of a crashing, inaccessible installation? :o)

  5. I don't know. It won't crash your server, but if may make your site inaccessible if it doesn't work. If so, though, it's easy to fix by editing those site and home URL values in the database. Go ahead and try it.

  6. impactphoto
    Member
    Posted 1 year ago #

    Yep, it sure made the system inaccessible! Fixed via the database now.

    Anyone out there fancy suggesting something on the .htaccess front?
    Having read up a bit on this now, I can see how it might possibly work, but it looks a bit complicated imho!

  7. http://stackoverflow.com/questions/4810846/mapping-a-secondary-domain-to-a-subdirectory-using-mod-rewrite for .htaccess but you may also need some domain parking/httpd.conf tweaks.

  8. impactphoto
    Member
    Posted 1 year ago #

    I think you're right.
    I also think I'm slightly out of my depth here, so have asked the question on their site.

    I'm also concerned that if I manage to get my url masked, it might stop SEO services from working. I'll post anything useful that comes back.
    Thanks for your advice Ipstenu.

Topic Closed

This topic has been closed to new replies.

About this Topic