Can .htaccess redirect a user without changing the url they typed in?
http://example.com/sample1.php
http://example.com/sample2.php#anchor
http://example.com/sample3.php?a=1#anchor
# All 3 files open the file main.php but the URL remains the same
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.
I found an answer but I’m cautious as to its security implications. Is putting this code in .htaccess a possible security hole:
Does this pose a threat or is it ok since I explicitly wrote down that only sample1.php and sample2.php will be redirected?