Why this rule:
RewriteRule ^(.*)/([1-9]+)[^/]$ /$1/?utm_source=$2 [R,L]
work with R flag and without it doesn't work. What's the problem ?
Because without the R
flag it's internal rewrite, it's not an actual redirect.
You can do some search on your own:
Please try to use the RewriteLog
directive: it helps you to track down problems:
# Trace:
# (!) file gets big quickly, remove in prod environments:
RewriteLog "/web/logs/mywebsite.rewrite.log"
RewriteLogLevel 9
RewriteEngine On
My favorite tool to check for regexp:
http://www.quanetic.com/Regex (don't forget to choose ereg(POSIX) instead of preg(PCRE)!)
You use this tool when you want to check the URL and see if they're valid or not.