WordPress.org

Support

Support » How-To and Troubleshooting » I destroyed my site — default htaccess?

I destroyed my site — default htaccess?

  • 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

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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?

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

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

    Thank you

    James

    http://inboxaward.com

    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?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘I destroyed my site — default htaccess?’ is closed to new replies.