Forum Moderators: phranque

Message Too Old, No Replies

.htaccess Redirect If Bad Word In Query

Need a little bit of help...

         

JoeT321

1:37 pm on Apr 15, 2006 (gmt 0)

10+ Year Member



Can someone show me how to have .htaccess check the user's query on my website and if there is any 'stop' words to just redirect to the main page?

I have a list of about 300 stop words for Adsense and I don't want my Adsense to be displayed on these pages if the user searches for them, therefore I want it to redirect to the main page.

This would involve checking the GET and POST...

Thanks in advance.

Moby_Dim

6:32 pm on Apr 15, 2006 (gmt 0)

10+ Year Member



May be you need use regex containing alternatives - (very¦long¦regular¦expression¦...) for GET. And may be it's impossible for POST. Perl script filter is needed here imho (I never used adsense and do not know it's mechanick, so sorry if i'm wrong.)