WordPress.org

Ready to get started?Download WordPress

Forums

I destroyed my site -- default htaccess? (5 posts)

  1. capty
    Member
    Posted 5 years ago #

    Hey, I couldn't find this anywhere else maybe someone could help me out.

    I was (smartly) playing around with my htaccess and killed it. Killed my site and my wp install. can be found @ http://www.tylerjameslee.com

    Is there a default .htaccess for wp 2.6.3 that I can find somewhere? thanks

  2. Len
    Member
    Posted 5 years ago #

    WordPress doesn't have a "default" htaccess per se. If you're using the default permalink structure you won't have that file. (unless you manually created it) If on the other hand you want to use so-called "pretty permalinks" WordPress will automatically create that file. Be advised that using "pretty permalinks" requires your server to have mod_rewrite (an Apache module that rewrites permalinks on the fly) enabled.

    Here is a very basic htaccess file using "pretty permalinks"

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

    Have you tried reverting to the default permalink structure then enabling pretty permalinks?

  3. capty
    Member
    Posted 5 years ago #

    thanks man , reverting and then coming back to permalinks worked. :)

  4. jamesbickerton
    Member
    Posted 4 years ago #

    Hi
    I had the same problem and this post saved my bacon.

    Thank you

    James

    http://inboxaward.com

  5. Gonzo Journals
    Member
    Posted 4 years ago #

    I had a similar, but somewhat different problem & this solution also worked for me at http://www.gonzojournals.com/.

    I had uploaded the wrong .htaccess file to this site and had tried replacing it with a file with only the command to 301 redirect non www to www (but the template already did this).

    For some reason this caused all of my links to become "broken" so I couldn't view any posts such as Twitter Creates New Search Page.

    Uploading the above code to .htaccess fixed it.

    Don't know why?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.