I am trying load
settings.php?id=5
by accessing
xml/5/settings.xml
here is the code but its not working im just getting a 404 error:
RewriteEngine On
RewriteCond %{QUERY_STRING} ^id=([0-9]+)$
RewriteRule ^([a-z_]+)\.php$ /%1/$1.xml [L]
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.
If you want your end user to enter
xml/5/settings.xml, you have your rewrite backwards. On the left input side, you need to match the input URI:This assumes
settingsis a dynamic value, which is captured in$2If
settingsis a static value, hard code it: