htaccess Elite

.htaccess tutorial


All times are UTC [ DST ]





Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Using RewriteCond and RewriteRule to strip query string data
PostPosted: 16 Sep 2008 22:54 
Offline

Joined: 16 Sep 2008 22:37
Posts: 1
Hello,

I've been trying to rewrite Brightcove links so that they are stripped of any player ID info.

An inbound link looks like this:

Code:
http://www.mywebsite.com/?bcpid=1370867768&bctid=1797029495


I want to remove the "bcpid=" part so that I can use a different player (Brightcove will only serve to the player that requested the video title, unless there is no specific player... then it will use the default, which is what I want)

I have tried this in my .htaccess with no success so far:

Code:
RewriteEngine On
RewriteCond %{query_string} ^bcpid=([0-9]{10})&bctid=([0-9]{10})$
RewriteRule .* ?bctid=%2


I also tried a shorter version, like this:

Code:
RewriteEngine On
RewriteCond %{query_string} ^bctid=([0-9]{10})$
RewriteRule .* ?bctid=%1


But I can't get this to match. I know mod_rewrite works because the Wordpress IfModule works. Any help would be appreciated.

Thanks,
Dave


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Powered by phpBB