.htaccess - Use htaccess to append a query string to URL -
i need append query strings urls campaign tracking/form submission. instance, need http://domain.com/page/ redirect http://domain.com/page/?campaign_id=123456
the way tried set giving me redirect loop error message when try visit domain.com/page:
rewriteengine on rewritebase / rewriterule ^index\.php$ - [l] redirect 301 /page http://domain.com/page/?campaign_id=1234656
i tried rewriterule instead, , giving me loop message:
rewriteengine on rewritebase / rewriterule ^index\.php$ - [l] rewriterule ^page$ http://domain.com/page/?campaign_id=1234656 [l,ne,r=301]
i'm sorry if question has been answered on here. searched awhile , couldn't find it, please don't yell @ me posting. did try find on own. thanks!
try:
rewriteengine on rewritebase / rewriterule ^index\.php$ - [l] rewritecond %{query_string} ^$ rewriterule ^page/?$ http://domain.com/page/?campaign_id=1234656 [l,ne,r=301]
Comments
Post a Comment