Error 405 when trying to use redirect

XUpload related questions

Moderator: admin

Message
Author
thumperuk
Posts: 4
Joined: Nov 20, 2006 5:17 pm

Error 405 when trying to use redirect

#1 Postby thumperuk » Nov 26, 2006 3:51 pm

When I change url_post from "mysite.com/post.php" to "index.htm" (or any other redirect link), I keep getting "HTTP 405 - Resource not allowed "error.

It appears that a redirect can only be another php file? Or am I doing something wrong!

I am using Pro 2.3 - version 2.2 worked fine redirecting to another page after uploading!

Any help greatly appreciated.!

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

#2 Postby PilgrimX182 » Nov 27, 2006 7:48 am

Sorry for this bug. It looks that IIS do not allow POSTing to .html files
Here goes the quick fix that will appear in next version:

in upload.cgi add this above "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;
}


this will redirect to URL if it's .htm(l), other case POST

thumperuk
Posts: 4
Joined: Nov 20, 2006 5:17 pm

Thanks

#3 Postby thumperuk » Nov 30, 2006 2:47 pm

Many thanks - works perfectly now!!


Return to “XUpload”

Who is online

Users browsing this forum: No registered users and 0 guests