Parameter not included in URL

Topics: Developer Forum, User Forum
Jun 4, 2010 at 8:23 AM

I have the following code in file IIRF.ini

CondSubstringBackrefFlag %
RewriteCond %{QUERY_STRING} navegacion_original
RewriteCond %{QUERY_STRING} dnh_refresco
RewriteRule .* - [L]
RewriteCond %{REMOTE_ADDR} !^$
RewriteCond %{QUERY_STRING} !^.*\.(jpg|png|gif|jpeg).*$ [NC]
RewriteCond %{QUERY_STRING} traducir=([^&]+)
RewriteCond %{QUERY_STRING} !inurl
RewriteCond %{REMOTE_ADDR} !^$
RewriteCond %{HTTP_REFERER} traducir=([^&]+)
RewriteCond %{QUERY_STRING} !^.*\.(jpg|png|gif|jpeg).*$ [NC]
RewriteRule ^(.*\.(php|html|htm|phtml|cgi|pl)|.*/)$ $1?traducir=%1  [QSA,R,L]

When browsing the website, for example, and clicking on one of the links contained within the page, the parameter name goes through, but not the content itself, remaining the url as follows:

I don’t know why this happens; I’d appreciate help.

Jun 4, 2010 at 9:00 AM

Which of those rules is firing?  It's easy to tell, if youlook at the IIRF log file.

I suspect that the most recent capture from a RewriteCond is empty, which is why you are seeing nothing for %1.

I don't know why that would happen but if I had to guess, I think it is the final rule that is firing.  The final RewriteCond on that rule is a negated condition, and it stores nothing in any of the capture groups. Which means %1 will always be empty.

That's just a guess.  It would be clear to you if you looked at the IIRF log file.


Jun 4, 2010 at 9:39 AM

yes, it was the rule 

RewriteCond %{QUERY_STRING} !^.*\.(jpg|png|gif|jpeg).*$ [NC]

thanks for your help! :)