I’m trying to rewrite a hyperlink on my small Apache config file to ensure that it appears as an internal link, but is really exterior.
The hyperlink on my small site may be like this, and also have multiple querystrings.
However when clicked on is going to be rewritten because this:
Here's where I'm to date (no longer working):
RewriteRule ^myscript.asp?(.*)$ http://www.othersite.com/script.asp?(.*) [L]
Can anybody understand this rule working? Thanks!
I really hope this is useful:
RewriteRule ^myscript\.asp\?(.*)$ http://www.othersite.com/script.asp?$1 [L]
Note: question mark(?) and us dot(.) have particular meaning in reqular expresion, so if you wish to rely on them as meaningless character put
\ before them!