Rewrite
Menu RewriteCond and RewriteRulex
 

RewriteCond and RewriteRule

The original reason for this page was that I suspected that someone is "Hotlnking" directly to some of my images from Facebook.

While this doesn't bother me too much I would like to be able to put some code in my .htaccess file to port the Facebook user somewhere else on this website.

On further inspection I am not so sure that anyone had linked to my images but it did give me a chance to look at the code to prevent this from happening. In addition, I may wish to use the redirect in the future.

In .htaccess:

Top

If you have access to the webserver configuration, as you would if you ran a Linux server running Apache, then you can place all of the redirection directives in the appropriate files.

The difference between REWRITE and REDIRECT

Scott Forsyth says:

Simply put, a redirect is a client-side request to have the web browser go to another URL. This means that the URL that you see in the browser will update to the new URL. A rewrite is a server-side rewrite of the URL before it’s fully processed by IIS. This will not change what you see in the browser because the changes are hidden from the user.

Links

Top

Site design by Tempusfugit Web Design -