This forum has been moved here:
Helicon Tech Community Forum

Helicon Ape (Forum Locked Forum Locked)
 Helicon Tech : Helicon Ape
Subject Topic: Add to URL
Author
Message |
Moran Nave
Newbie


Joined: 24 November 2010
Posts: 6
Posted: 25 November 2010 at 1:11am

How can I write a rule with condition that if to add to url expression with ? or with & (depends if the url already have ? with expression)

Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 25 November 2010 at 3:06am

Hello,

Usually, the fact that URL has '?' defines that URL has query string. This means we can use condition that if request has any kind of querystring than...
So as I understand, you simply want to append some other query string to the one that is already there. In this case you can use [QSA] flag, described here

So you rule would look like:

RewriteCond %{QUERY_STRING} (.+)
RewriteRule somepage.asp /otherpage.asp?newparam=param [NC,R=301,QSA]

So that if you request www.domain.com/somepage.asp?ID=2 --->redirects--> www.domain.com/otherpage.asp?newparam=param&ID=2


Regards
Andrew
Back to Top
 
Moran Nave
Newbie


Joined: 24 November 2010
Posts: 6
Posted: 25 November 2010 at 9:56am

Hello Andrew,

Thank you for your answer.

Continuing your example, will it also work for urls without a query string?

Meaning- if you request www.domain.com/somepage.asp --->redirects--> www.domain.com/otherpage.asp?newparam=param  ?

Regards,

Moran

Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 26 November 2010 at 4:17am

HEllo,

yes, but first delete the first line.

Regards
Andrew
Back to Top
 
Moran Nave
Newbie


Joined: 24 November 2010
Posts: 6
Posted: 26 November 2010 at 4:53pm

Dear Andrew,

I tried to use it with RewriteProxy and it didn't work.

Can you tell me how to use it properly?

Regards,

Moran

Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 29 November 2010 at 3:08am

Hi Moran,

Here's the documentation on RewriteProxy.
Usually it is used as:

RewriteProxy ^somepage\.asp$ http://www.otherdomain.com/otherpage.asp?newparam=param [NC,QSA]

If you still experience the issues, please provide the rule and rewrite.log.


Regards
Andrew
Back to Top
 
Moran Nave
Newbie


Joined: 24 November 2010
Posts: 6
Posted: 30 November 2010 at 10:27am

Hi Andrew,

Thanks, it helps.

But I get a JavaScript error that Ext is undefined when I get to the page, Can you tell what might be the problem?

Thanks,

Moran

Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 01 December 2010 at 3:43am

Hello,

Our latest researches show that issues with the script on the proxy'd side are usually fixed by [H] flag.
Documentation on it you'll see here

Regards
Andrew
Back to Top
 
Moran Nave
Newbie


Joined: 24 November 2010
Posts: 6
Posted: 01 December 2010 at 9:50am

Hi Andrew,

I used the flags: [CR,A,QSA,H], but still have the problem of Ext is undefined and no gifs are loaded. Is there anything else that can help?

Regards,

Moran

Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 02 December 2010 at 4:06am

The problem with pics and .css is usually related to absolute and relative paths to the files.
Please, chack that first.

Another thing to figure out the issue - is to take a look at rewrite.log.
Logging issues described in FAQ.
Please, provide the rewrite.log for the testing request.


Regards
Andrew
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version