WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Blog URL Error (10 posts)

  1. manpasand
    Member
    Posted 7 years ago #

    My blog url is conflicting with my site URL.

    I have installed my personal blog at http://www.tilakbisht.com/blog/ but when I use http://www.tilakbisht.com/index.php my personal blog shows. Even when I use wrong URL (http://www.tilakbisht.com/abc) blog's 404 error page shows not default 404 error page.

    I have already placed http://www.tilakbisht.com/blog/ in General option tab of Admin area.

    How can I solve this problem?

  2. moshu
    Member
    Posted 7 years ago #

    There is something messed up with your setup.
    Why do you have the WP index.php in your root directory?
    You should never have two index files in the same directory, and you already have your main index.html there.

  3. manpasand
    Member
    Posted 7 years ago #

    No, I don't have put index.php in root directory. All WP files in "blog" directory only.

    In root directory, there are only five .html files including index.html which you can find at http://www.tilakbisht.com or add index.html

  4. moshu
    Member
    Posted 7 years ago #

    What about your htaccess file? The .htaccess file for your WP nice permalinks should be in the "blog" directory.

  5. manpasand
    Member
    Posted 7 years ago #

    Following lines in my .htacess file

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^tilakbisht\.com
    RewriteRule ^(.*) http://www.tilakbisht.com/$1 [R=301,L]

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

  6. moshu
    Member
    Posted 7 years ago #

    I didn't ask WHAT is in your htacees. I asked WHERE the file is.

  7. manpasand
    Member
    Posted 7 years ago #

    It is also in root directory.

  8. moshu
    Member
    Posted 7 years ago #

    That's the problem! Read my post above.
    Seemingly, you will have to "cut" your htaccess file in two:
    Keep in the root the portion relating to the whole site AND have another one ONLY with the WP rewrite rules in the blog directory.

  9. manpasand
    Member
    Posted 7 years ago #

    BIG Thanks!!!

    Working fine now.

  10. Jeremy Clark
    Moderator
    Posted 7 years ago #

    your .htaccess file for you blog needs to be in you blog subdirectory.

Topic Closed

This topic has been closed to new replies.

About this Topic