Scribbles about htaccess fun

Image frame
Htaccess- 301 Redirect An Entire Directory / Folder

Htaccess- 301 Redirect An Entire Directory / Folder

Here’s a simple pierce of code which will permanently redirect a folder / directory. For example, if you have a directory in the following path: http://www.example.com/pictures/, and for whatever reason decide to rename the directory to http://www.example.com/new-pictures/, the following htaccess code will safely redirect all users from /pictures/ to /new-pictures/ Redirect An Entire Directory / [...]



Maruf scribbled this post.
1
htaccess fun
Sep 19th, 2009
Image frame
Htaccess: Prevent People Hotlinking Your Images

Htaccess: Prevent People Hotlinking Your Images

Here’s some Htaccess code that will prevent people from hotlinking images hosted on your server. Simply change the domain to yours and then apply the code to your .htaccess. It’s as easy as that. View Code PHP1 2 3 RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(.*\.)?brightcherry.co.uk [NC] RewriteRule \.(jpeg|jpg|gif|png)$ – [F] The code is basically saying [...]



Maruf scribbled this post.
1
htaccess fun
Aug 22nd, 2009
Get a free quote