views:

21

answers:

1

The tail end of my .htaccess reads:

RewriteCond %{query_string} ^(.*)$
RewriteRule ^([a-zA-Z0-9\-]+)/\?iframe x_iframe.php?pageurl=$1&%1 [L]

RewriteCond %{query_string} ^(.*)$
RewriteRule ^([a-zA-Z0-9\-]+)/?$ x.php?pageurl=$1&%1 [L]

What I'm trying to do is have it so that any URL ending in '?iframe' uses a different page.

What am I doing wrong?

Thanks.

A: 

You can only test the current URL path with the RewriteRule directive. The URL query can only be tested with the RewriteCond directive:

RewriteCond %{QUERY_STRING} ^iframe$
RewriteRule ^([a-zA-Z0-9-]+)/$ x_iframe.php?pageurl=$1 [L]
Gumbo