• Resolved lwatkins

    (@lwatkins)


    I had to recently reinstall my blog and have now ran into problems insuring that incoming links are pointing to the correct files.

    I installed it in the subdomain blog. So the URL for some income links go to http://blog.domainname.com/posturl

    Some of the incoming links have gone to http://domainname.com/blog/posturl

    I want the articles to be accessible from both the folder and the subdomain.

    Any time I attempt to resolve this issue it either ruins my menu structure and people can’t find the posts from inside wordpress, or it leads to 404 error or 500 server errors.

    Could someone point out what I need to do in addition to the following which keeps my menu structure and correctly pulls up the articles under http://domainname.com/blog/posturl/

    This is what I have in my htaccess file in the main folder.

    Options +FollowSymLinks
    RewriteEngine on
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    This is what I have in my htaccess file in the blog folder:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>
    
    # END WordPress

    I want this article http://creativevisionbooks.com/blog/2007/12/20/christmas-mouse-goes-to-the-movies-a-literary-tradition/ , and others, to be accessible at http://blog.creativevisionbooks.com/2007/12/20/christmas-mouse-goes-to-the-movies-a-literary-tradition/
    as well as the first method.

    I sure appreciate any assistance you can give me as I am missing out on quite a bit of traffic.

    Leisa

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter lwatkins

    (@lwatkins)

    As a follow-up I’ve also tried this:

    RewriteCond %{HTTP_HOST} ^folder.yoursite.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.folder.yoursite.com$
    RewriteRule ^(.*)$ http://www.yoursite.org/folder [L,R=301]

    and I still get 500 Internal Server Errors.

    Every thing I have found results in the internal server errors. I think it may have something to do with the two htaccess files conflicting, but if I remove the one out of the folder the links in the blog stop working.

    Leisa

    I want the articles to be accessible from both the folder and the subdomain.

    You can’t. Settle with one version, make the subdomain NOT to be redirected to a folder and it will work. Otherwise you will always have troubles.

    Thread Starter lwatkins

    (@lwatkins)

    It seemed to be that way before. Because I always linked to http://domain.com/folder/post and it worked. And google had indexed http://blog.domain.com/post and those articles came up when clicked on at google.

    Right now anything that google has indexed isn’t coming up because it linked to the subdomain name.

    So do I have to go in and redirect each of those articles by hand? And if so then I am assuming that I do that in the blog folder or do I do it in the main htaccess folder?

    Leisa

    1. There is no “htaccess folder”. Ever.
    2. It is a BAD way to have two URLs for the same article.
    3. As I said above: have your WP installed in the subdomain with NO redirection to a subfolder. And it will work + your G-indexed URLs will be correct.

    Another otpion is to settle for the now existing subfolder solution and forget the subdomain. It’s up to you.

    Thread Starter lwatkins

    (@lwatkins)

    1. There is no “htaccess folder”. Ever.

    I didn’t mean folder. I meant main folder.

    2. It is a BAD way to have two URLs for the same article.

    Exactly – which is why I want the subdomain to redirect to the folder. I don’t want two URL’s but somehow Google already indexed by the subdomain which I didn’t know it could have even done because all my URL’s show by folder.

    3. As I said above: have your WP installed in the subdomain with NO redirection to a subfolder. And it will work + your G-indexed URLs will be correct.

    That is what I did. Which is why I was so confused when it didn’t work. I created a subdomain and installed the blog in that subdomain. I then uploaded my database back-up and discovered that my internal links no longer worked.

    They were apparently all linked to http://domainname.com/blog/postpermalink/. As an example, I posted an article on the 20th of December which google linked to as http://blog.domainname,com/permalink, but the blog created the internal links as http://domainname.com/blog/permalink. About an hour later my website went down and I had to reinstall.

    The only way I could get the internal links to be correct was to reinstall the blog at http://domain.com/blog.

    So installing it in the http://domain.com/blog folder kept my internal links ok and lost my external, and installing at http://blog.domain.com resulted in none of my posts showing up at all. I’ve been working on this for days and it seems like I have tried every possible scenario to keep the internal structure and not lose my google links.

    Leisa

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Subdomain rediret to folder?’ is closed to new replies.