Tags » Htaccess

Redirect www to non www URL Using HTACCESS

How to redirect url http://www.example.com to http://example.com

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ 
RewriteRule ^(.*)$ http://%1/$1 

For more info http://techwelkin.com/redirect-www-to-non-www-url-htaccess-wordpress

Core PHP

Removing index.php from Magento URL's

This should be the default behaviour, if you ask me, however no one asked me.

Log in to the admin panel, and navigate:

System > Configuration > Web > Search Engine Optimization… 58 more words

PHP error_reporting per directory with htaccess

Finally figured it out how to set custom error_reporting in specific directory without changing the global configuration, this prevents me from forgetting setting it back. 41 more words

How to Password Protect a Website or Web SubDirectory With .htaccess & .htpasswd

Working on a website that you need others to see, but not the whole world? Password protecting a website (or a sub directory within a website). 315 more words


How to block URL to direct access of resources in Wordpress

To block resources(Attachment like : jpg|png|xls|pdf…) in WordPress, you have to modify in your .htaccess file.

Go to root of the directory and open .htaccess file in your text editor and add following line of code: 63 more words


serve scaled images by htaccess

<FilesMatch “\.(ico|jpg|jpeg|png|gif|js|css|swf|svg|pdf|flv|mp3)$”>
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault “access plus 1 month 2 days 3 hours”