Support » Fixing WordPress » rewrite subdomain to subdirectory using .htaccess

  • Resolved ChuckS

    (@chucks)


    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

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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

    This is far from an answer that will help all.

    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘rewrite subdomain to subdirectory using .htaccess’ is closed to new replies.