• I’ve read a few postings and guides to url redirects or rewrites, though I haven’t found one that directly addresses my situation. I’m unsure how to start the processes without breaking my site. Here goes:

    I am hosting another party’s website on my bluehost account. They have their own DNS server that we’ve pointed over to the appropriate subdirectory. So far so good. The site happyhandschildcare.com brings us to their homepage. However, once you start clicking through the site my root directory appears in the url: claytonsalem.com/happyhandschildcare/pictures (or whatever).

    None of this is surprising, I’m just not sure what the best(?) way to go about the rewrite. The site is mostly static pages(30 though 20 are to be junked) with one post menu item. There seem to be three options:
    1. Plug-in. There’s a bunch of plug-ins that rewrite urls. I haven’t looked at all of them though I did read a recommendation for “Redirection.”
    2. Settings -> General -> Site address. Is it that simple?
    3. htaccess. It doesn’t seem too terrible to modify the file, though it seems like it might be breakable. Plus, I think the htaccess file in my root directory is from an old Drupal installation… separate issue.

    Any advice? I might go ahead and try the Site address in the settings to see what that does.

Viewing 3 replies - 1 through 3 (of 3 total)
  • How’s your linux? Do you have cpanel or other server admin tools access? I’d say just make an add on domain (make sure you actually own that domain too). All this stuff is better done on the server rather than the application level in my opinion.

    Thread Starter claybaby

    (@claybaby)

    my linux is slim to none. i did a cd install on an old computer of puppy, but i haven’t learned much command line at all. i do have a cpanel. i’m not sure what you mean by add on domain… i’ll check the cpanel because i think they have that option.

    i did the wordpress settings -> site URL and it works. However, it is very bogged down and slow and the toolbar disappears whenever i navigate around the site.

    thanks for the suggestion.

    From the docs: An addon domain allows a new domain name to link to a subdirectory of your account. The addon domain’s files will be stored in a subdirectory of your public_html (Document Root) folder. Creating an addon domain gives you the ability to control multiple domains from a single account.

    https://etwiki.cpanel.net/twiki/bin/view/11_30/CpanelDocs/AddonDomains

    Essentially it runs a domain, call it myothersite.com out of the directory:
    myoriginalsite.com/myothersite but to the public it looks like myothersite.com.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘url rewrite(direct) for subdirectory best practice’ is closed to new replies.