WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] rewrite subdomain to subdirectory using .htaccess (4 posts)

  1. ChuckS
    Member
    Posted 2 years ago #

    First, I want to mention that I've done numerous searches on google, in the wordpress.org forums and in the codex for the answer to this question. I also contacted my ISP and the solution they gave me doesn't seem to work.

    Here's a quick summary of my migration:
    Old setup:
    - old blog host: mydomain.wordpress.com
    - old blog URL: blog.mydomain.com -> mydomain.wordpress.com
    - old DNS record: blog.mydomain.com. 3600 CNAME mydomain.wordpress.com.

    New setup:
    - new blog host: mydomain.com/blog
    - new blog URL: mydomain.com/blog
    - delete this: blog.mydomain.com. 3600 CNAME mydomain.wordpress.com.
    - need this: blog.mydomain.com -> mydomain.com/blog

    All of this works great except I'm not sure what lines to add to my root level .htaccess file to rewrite blog.mydomain.com to mydomain.com/blog.
    Important note: I want the URL in the browser to change to: mydomain.com/blog

    Unfortunately, my ISP instructed me to create a subdomain, and now to get this to work I think that I also have to either add an .htaccess file to my subdomain directory or delete the subdomain (and related DNS records).

    Thanks,
    Chuck

  2. ChuckS
    Member
    Posted 2 years ago #

    I thought that I would answer my own post here.

    This turned out to be fairly simple. When creating a subdomain at my ISP, I was able to easily create a redirect for blog.mydomain.com to mydomain.com/blog. They also allowed me to change the web site folder from public_html/blog.mydomain.com to public_html/blog. And creating the subdomain added some entries to my DNS record. My ISP is site5.com.

    That's all.
    Chuck

  3. Pioneer Valley Web Design
    Member
    Posted 2 years ago #

    This is far from an answer that will help all.

  4. ChuckS
    Member
    Posted 2 years ago #

    What's your point? You are protesting my response.

    I asked a question. No one responded. I explain how I resolved the issue. And you complain.

Topic Closed

This topic has been closed to new replies.

About this Topic