Helping you build a better website
(and other interesting web stuff)

CSSHTMLJavaScriptjQueryMSSQLMySQLPHPSilvaTechnologiesWordpress
Silva Web Designs - Blog

Default WordPress .htaccess

The .htaccess is a distributed configuration file, and is how Apache handles configuration changes on a per-directory basis.

WordPress uses the .htaccess file to manipulate how Apache serves files from its root directory, and subdirectories thereof. Most notably, WordPress modifies this file to be able to handle pretty permalinks.

This page may be used to restore a corrupted .htaccess file or a misbehaving plugin.

Default WordPress .htaccess configuration


    # BEGIN WordPress
    
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    
    # END WordPress

WordPress .htaccess configuration for a single sub-folder


    # BEGIN WordPress
    
    RewriteEngine On
    RewriteBase /foldername/
    RewriteRule ^index.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /foldername/index.php [L]
    

 

It’s good to share

Join the discussion