Blogs on

htaccess

knackforge blog

Redirecting the site using the htaccess

You can redirect your website to another by using RewriteRule in .htaccess.

For example:

If your website URL is example.eu, it can be redirected to another URL example.ch using htaccess.
If suppose your URL is example.eu/blog then the URL will be redirected to the same page.

The below rule have done this

RewriteCond %{HTTP_HOST} !^m\.
RewriteRule ^$ http://example.eh [R,L]

 

Continue reading →

How to make Apache faster for Drupal

If you are reading this blog post you must be striving to improve the performance of your site. When we speak about performance two things should be taken into account essentially.

  1. Number of requests the site is able to serve (The more, The better)
  2. Response time per request (The least, The better)

I guess it is not much needed to stress as how essential the response time plays in deciding the success of a website. Apache the prominent Web server plays a key role in this connection.

Continue reading →
knackforge blog

Enabling HTTP authentication for private Drupal site

At KnackForge we try to follow best practices in all our development processes. The list includes protecting development and stage sites from unauthorized access and search engines. HTTP authentication has been the simple and prime option of our choice. The steps involved in this process is fairly minimal and depends on apache's .htaccess file. Thus needs no restart to the web server.

 

Continue reading →