WordPress.org

Ready to get started?Download WordPress

Forums

.htaccess's location doesn't make it work (13 posts)

  1. wynderlon
    Member
    Posted 7 years ago #

    I'm a little confused as to where I should put my .htaccess. I tried to put it in wynderlon.com/wordpress/.htaccess where WordPress was installed, but when I log into my WordPress account and go to manage files, it says no file exists. I tried to move it to the index folder (wynderlon.com/.htaccess) but still got the same message. On top of that, it seems my WordPress will no longer record comments. The form doesn't appear on any of my posts, despite having the comments options to on. I can't help but think this may be tied to my .htaccess problems.

  2. Samuel B
    moderator
    Posted 7 years ago #

    The 1st location is the correct one.
    To access it in WP admin:
    Manage -> Permalinks.
    Set them however and save. To save it from the WPadmin, the .htaccess must have chmod 666. CHMOD back to 644 when finished for security.

    note - you won't see the file in your WP file manager

  3. ghanshyamgadhiya
    Member
    Posted 7 years ago #

    in common case .htaccess file is put into your 'main root directory' of your website not in wordpress folder. I put it in root directory and it worked(for permalink).

  4. wynderlon
    Member
    Posted 7 years ago #

    So even though under Manage -> Files there is a link where you can choose to edit your .htaccess directly, it should give you a message that the file does not exist?

    Also, I did put the .htaccess in my root directory. I CHMODed it 666, however I still get this message when I go to my permalinks under the WP admin: "If your .htaccess file were writable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file."

    I copied and pasted the rewrite rules into the .htaccess and saved it that way, CHMODing it again 666 (ASCII), but I still have the same problem. It says it can't write to my .htaccess and my comments are still missing.

    Here's what the mod_rewrite rules are:

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

    Thanks for the help!

  5. ghanshyamgadhiya
    Member
    Posted 7 years ago #

    if you want to just solve permalink problem than you can do it without .htaccess file.
    just write your permalink structure like this

    \index.php %---%(your permalink).

    now permalink will work without .htaccess file.

  6. BradyDale
    Member
    Posted 7 years ago #

    OK, I'm trying to upgrade to the new version of wordpress and I'm going through the detailed instructions... I can't find my .htaccess file anywhere. Just to be on the safe side, I copied my entire old wordpress folder (uploads, themes and all) to my own computer.
    Then I went to FileZilla and told it "Show hidden files".
    I've looked in my WordPress folder, my main domain folder, in a bunch of other subfolders that have nothing to do with wordpress...
    nada. I can't find it.
    I am such a klutz with all this but I swear I am really trying.

  7. BradyDale
    Member
    Posted 7 years ago #

    Okay, I just went ahead and upgraded and it didn't seem to blow up my blog, so i guess I'm all right. If it remained hidden, the way I deleted out my old files would not have deleted it, soooooo... I guess I'm cool. If I ever get more advanced I'll be curious to know where the darn thing is, though.

  8. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    By default, WordPress's .htaccess file will be in the root wordpress folder, whatever that is. Other .htaccess files may or may not exist on your system.

    Note that using the "index.php" in the permalinks will potentially break .htaccess files, and so the permalink string should not contain "index.php" unless there's no other way to do it. That is a workaround for some IIS installs, Apache doesn't usually need it.

    Also, .htaccess files are a hidden file (as is anything starting with a dot). You may not be able to see them by default in your FTP client. This is a FTP client setting you can probably change somewhere.

  9. BradyDale
    Member
    Posted 7 years ago #

    I guess maybe I just don't have one, because I did tell FileZilla to show hidden files and it's still not there.

  10. Chris_K
    Member
    Posted 7 years ago #

    Odds are if you're not using pretty Permalinks you won't have one.

  11. PenMaster
    Member
    Posted 7 years ago #

    HandySolo
    Could you be a little more specific.....

    Odds are if you're not using pretty Permalinks you won't have one.

    Posted 22 hours ago #

    Have one what?
    I thought .htaccess was required.
    While following this thread I saw the .htaccess listed above:

    Copy from WPO forum
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /index.php/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php/index.php [L]
    </IfModule>
    ===================================
    My .htaccess is missing a link for the RewriteBase:

    My .htaccess file

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

    # END WordPress
    =============================
    All seems to be working properly Now.
    But will this cause problems down the road?
    Thanx
    Pen Master

  12. moshu
    Member
    Posted 7 years ago #

    My .htaccess is missing a link for the RewriteBase:
    Not entirely true... it is "/" = your base!

    If your permalinks are set to the default you do NOT need any htaccess file.

    Don't go by the example you "quoted"... This should never happen:
    RewriteRule . /index.php/index.php [L]
    (notice the double index/index!)

  13. PenMaster
    Member
    Posted 7 years ago #

    I get it I always forget ( / = root )
    Thanx

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags