16 Useful tricks to do with htaccess in WordPress

Welcome to our community

Be apart of something great, join today!

edwin

Moderator
Messages
42
Reaction score
3
Points
8
Hi all,

Before you start with the tutorial, make sure to back up the current .htaccess file. Once you’ve done that, you can start editing your file.

This is the default content of a .htaccess file in a WordPress website.

# 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

First, we protect our .htaccess file from unauthorized users.
You don't have permission to view the spoiler content. Log in or register now.

Second, we protect our WP-Config.php file which contains the login information for your WordPress database as well as other important maintenance settings.
You don't have permission to view the spoiler content. Log in or register now.

You don't have permission to view the spoiler content. Log in or register now.

You don't have permission to view the spoiler content. Log in or register now.

You don't have permission to view the spoiler content. Log in or register now.

You don't have permission to view the spoiler content. Log in or register now.

You don't have permission to view the spoiler content. Log in or register now.

You don't have permission to view the spoiler content. Log in or register now.

You don't have permission to view the spoiler content. Log in or register now.

You don't have permission to view the spoiler content. Log in or register now.

You don't have permission to view the spoiler content. Log in or register now.

You don't have permission to view the spoiler content. Log in or register now.

You don't have permission to view the spoiler content. Log in or register now.

You don't have permission to view the spoiler content. Log in or register now.

You don't have permission to view the spoiler content. Log in or register now.

You don't have permission to view the spoiler content. Log in or register now.

Always have a backup of your .htaccess file. You have been warned :)
 

Advertisement

Top