Custom .htaccess WordPress

To customize your .htaccess file for your WordPress website do this:

  1. Locate your .htaccess file using an FTP program or WordPress plugin.
  2. Place your rewrite rules before the WordPress rewrite rules. Example below:
    # BEGIN WordPress

    # Begin Custom htaccess

    RewriteRule ^specialpage$ customedirectory/myspecialpage.php
    #  End Custom htaccess

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

  3. Now save and upload the file using an FTP program or WordPress plugin and you’re done.
Advertisements

Published by

angelo bonavera

Hi I'm a web developer and I run a web hosting company called 2slick.com.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s