How mod-rewrite L and END flags work in htaccess

April 24, 2021 0 Comments

In this article I will give you a quick overview of mod-rewrite L and END flags. I will show you (with examples) how these two flags work and what’s the difference between L vs END . What is L flag and how it actually works in htaccess L is the most used flag in RewriteRule …

How to modify your htaccess on WordPress | Add custom rules WordPress htaccess

April 22, 2021 0 Comments

In this article I will give you a quick overview of what the wordpress htaccess is , how it works and how you can manually add your custom code to your htaccess on WordPress site. With WordPress blog CMS you get a default htaccess file that the WordPress uses to manipulate your blog URLs. Your …

Learn the basics of mod-rewrite | htaccess tutorial step by step for beginners

April 15, 2021 2 Comments

htaccess has always been a confusing topic for all Apache users especially for newbies who are learning to write RewriteRules to modify URLs via an htaccess file. The reason why some people find it confusing is because the Apache mod-rewrite documentation is hard to follow and there are no easy to follow htaccess step by …

Converting a long query string URL to short and SEO friendly using RewriteRule in htaccess

April 3, 2021 0 Comments

In this post you will learn how to shorten a long URL with very simple steps using RewriteRule directive in an htaccess file. We are going to change a really long URL that is hard to type , hard to remember and not good for SEO in this article. We have a URL of the …

IMG, JS, CSS and other files failed to load after using RewriteRule in htaccess?

March 30, 2021 0 Comments

One of the most common issue every mod-rewrite users encounter while using RewriteRule directive to shorten their URLs is the IMG, CSS , JS and other relative resources failing to load. If you are using RewriteRules to rewrite your URLs then you may sometimes face this kind of issue . This is a normal behavior. …

How to set an ENV (Environment) variable using RewriteRule in htaccess

March 27, 2021 0 Comments

There are different ways and directives to set an environment variable on Apache server through a htaccess file. One of the most common and the easiest way to set an Environment variable is by using a RewriteRule directive. It’s the easiest method because you can rewrite your domain requests based on env and also you …

Redirect a domain to another domain without changing URL with htaccess

March 26, 2021 0 Comments

In this post I will show you how to write a rule to redirect your domain to an external domain without changing the URL in browser address bar . Redirect domain without changing the URL . You need to enable proxy module on your apache web server in order to map/redirect (internally) your domain to …

Map a subdomain to subfolder with htaccess

March 25, 2021 0 Comments

With an htaccess rewrite ,it is quite possible to map your subdomain to subfolder if its not already pointing there. Suppose, you just created a new subdomain named bar.example.com and its currently pointing to you root directory , you can simply use a RewriteRule to map it to a new folder. This article will teach …

http to https and enforce www in one 301 redirect on htaccess

March 23, 2021 0 Comments

If you are looking for an htaccess RewriteRule that enforces www and https in one redirection and without creating multiple redirects then you have come to the right place. On this article I am going post a 100 percent working rule that you can just copy and paste to your htaccess file. Here is the …

Mod-rewrite NE flag uses and code examples

March 22, 2021 0 Comments

In this article we will learn about mod-rewrite NEflag. What this flag is used for and why we should use it all these frequently asked questions are answered in this article. NE stands for NoEscape We use this flag in RewriteRule to tell the engine not to escape special characters like # , & .. …