me looking so small in this world

30 2006f November, 2006

prevent image hot-linking

Filed under: apache, htaccess — rudyegenias @ 10:44 am

 RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?your-domain.com/.*$ [NC]
RewriteRule .(gif|jpg)$ – [F]

Preventing hot linking of images in pages.

src:  http://www.bloghash.com/2006/11/beginners-guide-to-htaccess-file-with-examples/

21 2006f August, 2006

enabling mod rewrite in xampp

Filed under: htaccess, xampp — rudyegenias @ 5:01 am

I know this is pretty lame but being not lame is not beginner friendly. Being used to htaccess’ power to make my links more user friendly. I find the default installation of xampp a bit of lacking it. Thought it’s only because I do have with me the lite version of it (xampplite). But I have with me a full installed xampp better yet check it. Nothing.

So I did a little poking into configuration file of apache that came bundled with it. This is what I found out. By default mod_rewrite module is not enabled by default so I took the following steps.

To enable mod_rewrite in xampp first go to the directory of installation <xampp-directory>\apache\conf  and edit httpd.conf. Find the line which contains
#LoadModule rewrite_module modules/mod_rewrite.so
uncomment this(should be):

LoadModule rewrite_module modules/mod_rewrite.so

Also find AllowOverride None 

Should be:

AllowOverride All

I really think it appears 2 or 3 times on the configuration file.

Happy xampping!

Blog at WordPress.com.