htaccess Elite

.htaccess tutorial


All times are UTC [ DST ]





Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Query string issue
PostPosted: 16 Sep 2008 21:38 
Offline

Joined: 16 Sep 2008 21:20
Posts: 1
Mornin',

I've been looking for an answer to my htaccess problem but I'm not particulary bright with htaccess so I'm hoping one of you out there can help. Basically I have an url:
http://www.domain.com?var=this

and I need it to go to:
http://www.domain.com?newvar=this

The problem I'm experiencing is the url i get is:
http://www.domain.com?var=this&newvar=this

From what I could gather the code is supposed to resemble:
Code:
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} ^var=(.+)$ [NC]
RewriteRule ^.*$ ?newvar=%1 [QSA,L,R=301]


Any help would be appreciated.


Top
 Profile  
 
 Post subject: Re: Query string issue
PostPosted: 29 Sep 2008 13:14 
Offline

Joined: 29 Sep 2008 13:00
Posts: 2
use this.

RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} ^var=(.+)$ [NC]
RewriteRule ^.*$ ?newvar=%1? [QSA,L,R=301]


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: MSNbot Media 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:
Powered by phpBB