Gossamer Forum
Home : General : Internet Technologies :

Redirecting toanother server

Quote Reply
Redirecting toanother server
I need help redirecting some pages. I use an outside service for my guestbooks and message board, and I redirect them as follow, but I am looking for simpler version, since I there are hundred of this pages in different categories (this redirect only work in the first 9 pages):

redirect /app?ID=RomanceLinks&DOC=1 http://gbooks1.melodysoft.com/...manceLinks&DOC=1
redirect /app?ID=RomanceLinks&DOC=11 http://gbooks1.melodysoft.com/...anceLinks&DOC=11
redirect /app?ID=RomanceLinks&DOC=21 http://gbooks1.melodysoft.com/...anceLinks&DOC=21
redirect /app?ID=RomanceLinks&DOC=31 http://gbooks1.melodysoft.com/...anceLinks&DOC=31
redirect /app?ID=RomanceLinks&DOC=41 http://gbooks1.melodysoft.com/...anceLinks&DOC=41
redirect /app?ID=RomanceLinks&DOC=51 http://gbooks1.melodysoft.com/...anceLinks&DOC=51
redirect /app?ID=RomanceLinks&DOC=61 http://gbooks1.melodysoft.com/...anceLinks&DOC=61
redirect /app?ID=RomanceLinks&DOC=71 http://gbooks1.melodysoft.com/...anceLinks&DOC=71
redirect /app?ID=RomanceLinks&DOC=81 http://gbooks1.melodysoft.com/...anceLinks&DOC=81

Can I use redirectmatch???? Would something like this work?

RedirectMatch (.*)\app?ID=RomanceLinks$ http://gbooks1.melodysoft.com/app?ID=RomanceLinks$

what would be the correct format?

The book location in this case is:/app?ID=RomanceLinks

and the server for the book is:http://gbooks1.melodysoft.com/
Quote Reply
Re: [zucye] Redirecting toanother server In reply to
Try:

RedirectMatch /app?ID=RomanceLinks&Doc=(.*) http://gbooks1.melodysoft.com/app?ID=RomanceLinks&Doc=$1

See: http://httpd.apache.org/...s.html#redirectmatch for more info.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [zucye] Redirecting toanother server In reply to
I forgot to mention that the redirect I am ussing in the following format:

redirect /app?ID=RomanceLinks&DOC=1 http://gbooks1.melodysoft.com/...manceLinks&DOC=1

does not work either. I believe is because it does not have a (*.*) format. Can you please help me??
Quote Reply
Re: [Alex] Redirecting toanother server In reply to
I just tried it, and it does not work I believe it is because there is no period (.) in the expresion. It does not have an extension as jpg or gif.

The one I use right now, does not work either. forgot to mention that earlier.

Thanks

Zucye
Quote Reply
Re: [zucye] Redirecting toanother server In reply to
As far as I can tell, Alex's suggestion should work.

Quote:
I believe it is because there is no period (.) in the expresion. It does not have an extension as jpg or gif.

It's not looking for a period. A "." is a meta-character used to match any character.
Quote Reply
Re: [Paul] Redirecting toanother server In reply to
I wish It would inded work, but it dos not work. I have used the following 2 formats and neither one works:

RedirectMatch /app?ID=RomanceLinks&Doc=(.*) http://gbooks1.melodysoft.com/...anceLinks&Doc=$1 (as per Alex)
redirect /app?ID=RomanceLinks&DOC=1 http://gbooks1.melodysoft.com/...manceLinks&DOC=1 (as per my long version)

(I am redirecting files with .html extension with no problem)