WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] directory index versus index.php problem (3 posts)

  1. monkeyslunch
    Member
    Posted 6 years ago #

    Hello!

    Parts of my website were recently hacked so I decided to just start over from scratch since it was time to do something new anyways.

    I'm having trouble remembering how to do a few things though, it seems.

    I am at http://www.monkeyslunch.com
    I have my blog installed in a seperate folder than my root.
    It's at monkeyslunch.com/blog/

    I edited my htaccess to point to the blog/index.php page as the default page to load when someone visits the site.

    However, when trying to access individual directories like
    /blog/
    where it would normally load the index.php file automatically its defaulting back to loading the directory information.

    My htaccess file in my root folder looks like this:

    RewriteEngine on
    RewriteBase /

    ReWriteRule ^index/?$ index.php [L]
    DirectoryIndex blog/index.php

    <Files 403.shtml>
    order allow,deny
    allow from all
    </Files>

    deny from 85.12.60.30
    deny from 58.65.239.114

    And if you're not quite sure what I'm talking about, I'm talking about how these two links should load the same thing:
    http://www.monkeyslunch.com/blog/
    http://www.monkeyslunch.com/blog/index.php

    As well I'd like any other directory on the server to load an index.php file if there is no index.html, .htm, .shtml, default.htm, etc page in the directory.

  2. moshu
    Member
    Posted 6 years ago #

    You shouldn't use any kind of redirects... WP doesn't "like" it.
    If you have installed in a subdir (blog) and what it to be displayed at the root, follow:
    Giving_WordPress_Its_Own_Directory

  3. monkeyslunch
    Member
    Posted 6 years ago #

    Ack! Of course, no wonder nothing rang any bells or made any sense.

    You, Moshu, are a life saver. Thanks a bunch! For now, this is resolved and I'll message if I have more troubles.

    Thanks again.

Topic Closed

This topic has been closed to new replies.

About this Topic