Forums

Move the blog to a subdirectory (6 posts)

  1. flumueller
    Member
    Posted 5 months ago #

    Hello there,

    Currently, my blog is located in the root dir of my web, but because of I wanna launch a regular website beside the blog, I wanna move it into the subdir "myweb.com/blog".

    Technically I know what to do (modify config, move files).
    The problem is, that I dont wanna loose all the links from external sites which are pointing to my blog (to specific articles)

    For instance, if someone uses this link http://www.myweb.com/category/myarticle/ but the blog isn't in the root dir anymore, how can I redirect all this requests to http://www. myweb.com/blog/category/myarticle/.

    I also wanna redirect visitors from the top level domain directly to the subdir till my regular website is ready to launch. That means if someone goes to myweb.com, he should automatically see the blog in the subdir (till I remove the auto-redirect).

    I guess I've to use a .htaccess in the root dir?
    Any ideas?

    Thank you very much

  2. flumueller
    Member
    Posted 5 months ago #

    hm, any ideas?

  3. henkholland
    Member
    Posted 5 months ago #

  4. flumueller
    Member
    Posted 5 months ago #

    thanks for the link, i did it and the problem is not what the styles aren't displayed although the path to the stylesheet is correct.
    I guess something with the url rewrite must be wrong:

    The link to the blog is http://www.housetrip.com/blog.

  5. flumueller
    Member
    Posted 5 months ago #

    my .htacces file looks like that:

    # -FrontPage-
    Options +SymLinksIfOwnerMatch
    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName xxx
    AuthUserFile xxx
    AuthGroupFile /xxx

    Action php /cgi-php52/php
    AddHandler php52 .php

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

    # END WordPress

    Is here something wrong? what exactly I've to modify in the .htaccess file in the webroot?

  6. henkholland
    Member
    Posted 5 months ago #

    o, difficult I think.
    First, is your .htaccess also in the root together with your index.php ? It should be.

    Your .htaccess section for Wordpress is identical to mine.

    Here is more about moving WP:
    http://codex.wordpress.org/Moving_WordPress

    Not nice.

    Sorry for the late answer; we are in different timezones, I believe (literally).

Reply

You must log in to post.

About this Topic