I am new on stackoverflow.com and also in .htaccess.
I just ask one thing:
RewriteCond %{QUERY_STRING} ^event_id=156$
RewriteRule ^test1.php?$ /htaccess_test/test.php
RewriteCond %{QUERY_STRING} ^event_id=154$
RewriteRule ^test1.php?$ /htaccess_test/test2.php
I just want to merge these two rewrite rules because i have lots of these kinds of rules. So i just want to wrap up these things instead of writing two more lines each and every time for new event_id.
Can you please tell me how can i write this thing?
As I see, you want to redirect test1.php to test.php or test2.php due to different event_id.
I don’t think you can merge these two rules because the destination is not the same due to different conditions. But you can merge the different event_id to the same condition, like you want event_id 156 157 158 to redirect to test.php, want 152 153 154 to redirect to test2.php, you can write this way:
Hope this help you more or less.