chnaging url_post to a redirect htm page

XUpload related questions

Moderator: admin

Message
Author
packerm
Posts: 8
Joined: Dec 05, 2006 4:23 pm

chnaging url_post to a redirect htm page

#1 Postby packerm » Dec 15, 2006 12:18 pm

Hi

Read another post on this forum that said I could chnage the url_post parm in xuploadconfig.pm to a web page rather than the post-cgi. Just wanted to direct it to a thank you page basically.

If you just change it to

url_post => 'http://www.tshirt-mad.co.uk/thanks.htm',

you get a 405 error saying you can't use a post method to open the web page.

Any ideas if I need to change anything in the CGIs to get this to work, or is there a better way of re-directing back to a web page once the upload is finished.

Thanks

Mick

User avatar
PilgrimX182
Posts: 2182
Joined: Mar 22, 2006 1:39 pm
Location: UFO Lab
Contact:

#2 Postby PilgrimX182 » Dec 15, 2006 12:46 pm

Yes. This error was born in Pro 2.3 version after config simplification and already solved, won't be in 2.4 version.

Here goes quick fix: in upload.cgi insert above line "if($ENV{QUERY_STRING}!~/js_on=1/)":

Code: Select all

   if($url_post=~/\.htm(l|)$/i)
   {
      print"Content-type: text/html\n\n";
      print"<HTML><HEAD><Script>parent.document.location='$url_post'</Script></HEAD></HTML>";
      exit;
   }

packerm
Posts: 8
Joined: Dec 05, 2006 4:23 pm

#3 Postby packerm » Dec 15, 2006 1:37 pm

Thanks, works a treat.

vnairp11
Posts: 10
Joined: Jan 07, 2007 4:06 pm
Contact:

#4 Postby vnairp11 » Jan 08, 2007 4:35 pm

i put in the code where do you put the url to redirect? is it the url post in form html?

vnairp11
Posts: 10
Joined: Jan 07, 2007 4:06 pm
Contact:

#5 Postby vnairp11 » Jan 08, 2007 4:52 pm

Nm fixed this issue thanks.


Return to “XUpload”

Who is online

Users browsing this forum: No registered users and 3 guests