MySpace Backgrounds - Credit Card Consolidation - Refinance - Samsung - Loans

PDA

View Full Version : htaccess keyword redirect? (Please help out)


shenron
May 25th 2007, 4:30 am
Hi everyone!

I'm having a little issue with one of my sites:

I need to block access to some pages of the site or redirect users back to homepage if a specific keyword appears at the URL.

I explain better:

I have w_ww.whatever.xyz

While browsing the pages or using the search function of the site I need to redirect the user(s) to a particular unauthorised page, homepage, other site or wherever if a keyword is present.

Example:

w_ww.whatever.xyz/tag/whatever
w_ww.whatever.xyz/tag/?keyword=whatever

And each time whatever is present I want to redirect users to someplace.

What do I need to do at the htccess file? :o

Thx a lot!

Nintendo
May 25th 2007, 6:11 pm
Options +FollowSymLinks +Indexes
RewriteEngine on
RewriteBase /
RewriteRule ^tag/([^.]+)$ tag/index.php?keyword=$1 [L]

And link to the shorter URL.

If it messes the script up, add an extension, or a / after the keyword.