Forums

From root to directory - rewrite rules (7 posts)

  1. eaglenick
    Member
    Posted 3 years ago #

    What rewrite rules would I need to put in my .htaccess file if I am moving the blog from the root to a /blog directory?

    Thanks.

  2. stvwlf
    Member
    Posted 3 years ago #

    You need more than rewrite rules changed

    http://codex.wordpress.org/Moving_WordPress

  3. figaro
    Member
    Posted 3 years ago #

    Also see the video in the following post for a step-by-step demonstration.

    http://educhalk.org/blog/?p=82

  4. eaglenick
    Member
    Posted 3 years ago #

    @stvwlf: I know there is more to be done than the rewrite rules. I just don't know what rules to apply.

    @figaro: Thank you, but I know how to move the blog between the root and sub-directories. As my first post implies, I need to know what rewrite rules to apply to my .htaccess file in order for visitors to be redirected to the new location when trying to access the original URL.

    Thanks.

  5. figaro
    Member
    Posted 3 years ago #

    The following is what I have in my .htaccess in root to auto redirect people from http://educhalk.org to http://educhalk.org/blog

    RewriteCond %{HTTP_HOST} ^.*$
    RewriteRule ^/?$ "http\:\/\/educhalk\.org\/blog" [R=301,L]
  6. stvwlf
    Member
    Posted 3 years ago #

    hi

    you didn't make what you are looking for clear in your first post.

    redirect 301 /index.html http://mydomain.com/{subdir}/

    sub the folder you moved your installation to for {subdir}

  7. whooami
    Member
    Posted 3 years ago #

    RewriteRule ^/$ /blog/ [R]

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.