Archive for the 'Programming' Category

A better HTMLencode for protection against cross-site scripting (XSS)

Cross site scripting can get really ugly. When interacting with a website visitors might try to post script (mostly javascript) which could be harmful.

Read more »

Better URL for images with mod_rewrite

Apache is a popular server platform which among other things includes an URL rewriting function called mod_rewrite. This function is usually used to rewrite URL:s for documents in order to make them more SEO-friendly.

mod_rewrite is applicable for images

Actually its pretty obvious that mod_rewrite works for images as well. Among other things, this technique is used for protection against hotlinking (preventing images being shown on external domains). So, why not use mod_rewrite for better looking URL?

Read more »