Author: amitoverflow

Commonly used regular expression patterns in apache RewriteRule

RewriteRule directive uses a Regular expression based pattern to match against URL path. In this post we will cover some basic and commonly used patterns that are most often used in RewriteRule. RewriteRule basic regex (.*) Catch-all and save (zero or more characters) (.+) Catch-all and save (one or more characters) ([a-zA-Z0-9]+) Catch-all alpha numbric…
Read more

How to add YouTube videos to WordPress and blogger posts ?

How to add YouTube videos to WordPress or blooger pages Most often when we write a blog post we want to add our favourite youtube videos to it. If you don’t know basic HTML then you might find it a bit hard to figure out how Videos are embeded on web pages. In this post…
Read more

How to change youtube channel default layout to brand type account

When you create a YouTube channel the default channel layout you get is vertical type and your account looks something like the following on YouTube App You can easily change your layout to make it look like a brand account with inline menues like the following screenshot : Although on YouTube app you will not…
Read more

How to redirect non-logged in users using RewriteRule in htaccess

Redirect non-logged in users using htaccess With apache mod-rewrite it is quite possible to manipulate http cookies. The cookie you set using php or RewriteRule can easily be accessed using RewriteCond directive. If you need to redirect your non-logged in users of your website to a diffrent page using RewriteRule you need to check the…
Read more

How to use mod rewrite %{THE_REQUEST} variable in htaccess?

Many users who use htaccess often get confused by mod-rewrite %{THE_REQUEST} variable. The questions what is it and how do we use it appear on their mind. In this post I will explain what %{THE_REQUEST} actually is and how we can use it in rewriteRule. What is %{THE_REQUEST} in mod rewrite? %{THE_REQUEST} is a mod…
Read more

Remove multiple file extensions using RewriteRule in htaccess.

How to remove multiple file extensions using RewriteRule in htaccess ? .htaccess is a directory level configuration file used on apache server. Many users who don’t have access to their main server.config file use htaccess to rewrite URLs and configure other custom server settings. Htaccess is often used by Apache users to shorten URLs when…
Read more

How to fix “Your connection to this site not fully secure” mixed contents SSL error

The error “Your connection to site is not fully secure is most often caused by mixed contents. This happens when a mixture of secure and non-secure elements is sent over the secure sever. Chrome browser flags such URLs as insecure and removes the green ssl padlock. The appearance of https:// URL perfix changes from green…
Read more

How to create a subdomain on cloudflare using DNS? Cloudflare subdomain

Cloudflare is a content delivery management and website performance boosting system on the web.We use Cloudflare with purposes of increasing performance and security of our website. When you add a domain to cloudflare all the external requests your domain receives reaches your web hosting server quickly via Cloudflare CDN. Cloudflare checks your domain or subdomains…
Read more

Diffrence between URL rewriting and URL redirection htaccess topic

URL rewriting and URL redirection are two different terms used to map a URL from one location to the other. These two terms often confuse new users especially when they refer to URL related queries. Some users even intermix the URL rewriting logic with URL redirection like they are talking about a particular thing with…
Read more

How to set cookies using RewriteRule in htaccess or server.config file?

Hello! In this post I will show you how we set an http cookie using a RewriteRule directive in an htaccess or server.config file. I saw many unanswered and confusing posts on StackOverflow and on other sites so I thought It would be worth writing a post that can help peope who are searching the…
Read more