WordPress: Using Permalinks, .htaccess file missing

In order to use Permalinks for WordPress, a .htaccess file is needed in order to work. The installation files for WordPress do not include a .htaccess file for using Permalinks. Not sure why it’s not, but in any case, this is the contents of the file:

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

The location of the .htaccess file is the root folder of the web site (along with index.php, wp-activate.php, wp-app.php, wp-atom.php, etc).

[UPDATE] 4/1/2011

The reason a .htaccess file is not included in the installation files of WordPress is because WordPress tries to create or update the file when Permalinks is enabled. In order to do this, write access to the .htaccess file is needed by the web server. I recommend not allowing write access to your .htaccess file by the web server as this could be a potential security risk.

This page on WordPress’ web site talks about using Permalinks:

http://codex.wordpress.org/Using_Permalinks#Where.27s_my_.htaccess_file.3F

[UPDATE] 1/10/2013

The .htaccess code can also be found in the administration area of your WordPress web site. To get the code go to Settings -> Permalinks and it is at the bottom of the page.

0 Facebook Comments




One comment on “WordPress: Using Permalinks, .htaccess file missing

  1. damon cozzo

    hello,my name is damon hacked by hime7 was my sight harlynightrain06 was the original name of the sight i didn’t know what i was doing a the time , still don’t i payed Brian host to build the web sight the sight wont give me any support or have any thing to do with with the sight because of suspicious behavior until now i didn’t know what to do and, to be honest i still dont my email is *** could you help me out please .right now i just want to take it back from him and let him see how it feels . any way if you chose not to thank for the help you have provided

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>