文件上传器返回错误302

时间:2012-08-19 20:30:30

标签: php apache

我有一个独立的文件上传器,它安装在我的dedi'服务器中。 上传器文件位于我的主控制面板文件夹中 -

  

的/ usr /共享/ nameofcontrolpanel /公共/上传。

我把它放在那里,因为每当我尝试将它放在/ var / www中时。它不会加载,只是去控制面板,所以我把它放在apache当前读取web根目录,在控制面板公用文件夹中。

每当我尝试使用上传程序上传文件时,我都会收到错误302。 我只是猜测这与apache有关吗? (我已经有了php 5.3这是一个要求)

这是上传者的.htaccess。

# Enable rewrite engine and route requests to framework
RewriteEngine On

## The only you have to edit is this one.
## If the Files Inbox is located at inbox.yourwebsite.com, you will set
## RewriteBase /
## If it is located at www.yourwebsite.com/filesInbox, it will be
## RewriteBase /filesInbox/



## THIS IS THE ONLY LINE YOU HAVE TO CHANGE
RewriteBase /



## !!!
## DO NOT REMOVE THE FOLLOWING LINES !!
## !!!

RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L,QSA]

# Disable ETags
<IfModule mod_headers.c>
    Header Unset ETag
    FileETag none
</IfModule>

# Default expires header if none specified (stay in browser cache for 7 days)
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault A604800
</IfModule>

# Use PHP 5.3
AddType application/x-httpd-php53 .php 

上传者的网址是uploader.mysite.com

我需要寻找什么才能摆脱错误302并成功上传?

1 个答案:

答案 0 :(得分:1)

302是HTTP代码,表示正在进行重定向。 http://en.wikipedia.org/wiki/HTTP_302

我玩了.htaccess文件已经有一段时间了,但它看起来像是重定向到网站的根目录,听起来你的上传程序脚本不在网站根目录中。这可能是您错误的来源。