Tony VanScoy wrote:
I got it.
RewriteCond %{QUERY_STRING} ^file\=12$
RewriteRule ^/test\.php$ /pdf/somfile.pdf [R,L,T=application/pdf]
Looks like i needed regex in the RewriteCond.
Thanks.
That was my bad on the % to $ typo. Sorry.
The last argument for the Rewrite Cond can be either a rege
I got it.
RewriteCond %{QUERY_STRING} ^file\=12$
RewriteRule ^/test\.php$ /pdf/somfile.pdf [R,L,T=application/pdf]
Looks like i needed regex in the RewriteCond.
Thanks.
-
The official User-To-User support forum of the Apache HT
>
> RewriteEngine On
> RewriteCond ${QUERY_STRING} "file"
> RewriteRule ^/test\.php$ /index.php [R]
>
Well i fixed my typo ${QUERY_STRING}, it should be %{QUERY_STRING}.
But still not working.
-
The official User-To-User suppor
> > I want to redirect certain requests to a pdf depending on a get
> > variable. nothing new, but I just can't get it to work. So I started
> > with the basics but just redirecting a certain page to a pdf, which
> > works.
> >
> > RewriteRule ^/test\.php$ /pdf/somefile.pdf$ [R,T=application/pdf]
>
Tony VanScoy wrote:
I want to redirect certain requests to a pdf depending on a get
variable. nothing new, but I just can't get it to work. So I started
with the basics but just redirecting a certain page to a pdf, which
works.
RewriteRule ^/test\.php$ /pdf/somefile.pdf$ [R,T=application/pdf]
W
I want to redirect certain requests to a pdf depending on a get
variable. nothing new, but I just can't get it to work. So I started
with the basics but just redirecting a certain page to a pdf, which
works.
RewriteRule ^/test\.php$ /pdf/somefile.pdf$ [R,T=application/pdf]
Which works fine. But,