I have a software package placed in the root directory of my website. I’d like all visitors which come from other websites to see the homepage first, before they download. How can I do that without using a script?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Apache’s mod_rewrite can do this. It can test ‘HTTP_REFERER’ variable and create a redirect.
Example from http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
Other variant http://articles.sitepoint.com/print/apache-mod_rewrite-examples
First line checks if referer is empty. second – if it is not your domain.
Third will redirect “bad queries” to “hotlinked.gif”