I want that when person types:
quizz.pl/emit/myvariable
server will call file emit.php and pass myvariable as the f parameter:
quizz.pl/emit.php?f=myvariable
I need it to work only when person types “emit”.
How to acomplish it using htaccess?
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.
Try this code:
The IfModule tag will check that the rules are only executed when
mod_rewriteis installed. The second line activates theRewriteEngine. The third line will set the base for you. The next two lines check that if there is a directory or a file which has the same name will be returned instead of some url rewriting.The
RewriteRuledoes the real magic it checks if the url beings with emit and puts everything after as a parameter to youremit.php.