文件上传器返回错误302 [英] Files uploader return error 302

查看:1919
本文介绍了文件上传器返回错误302的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have a standalone files uploader which is installed in my dedi' server. the uploader files are in my main control panel folder -

/usr/share/controlpanel名称/public/uploader.

/usr/share/nameofcontrolpanel/public/uploader.

我把它放在那儿是因为似乎每当我尝试将它放在/var/www中时.它不会加载,只是转到控制面板,所以我将其放置在apache当前读取Web根目录的位置,该目录位于控制面板公用文件夹中.

i put it there because it seems whenever i try to place it in /var/www. it wont load and just go to the control panel, so i placed it where apache currently reads the web root, which is in the control panel public folder.

每当我尝试使用上传器上传文件时,我都会收到错误302. 我只是在猜测这与Apache有关? (我已经有php 5.3了)

i am getting error 302 whenever i try to upload files with the uploader. i am just guessing this is something to do with apache? (i already have php 5.3 which is a requirement)

这是上传者的.htaccess.

This is the .htaccess of the uploader.

# 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

The url for the uploader is uploader.mysite.com

要消除错误302并成功上传,我需要寻找什么?

What do i need to look for to get rid of the error 302 and to upload successfully?

推荐答案

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

302 is an HTTP code which means redirection is occurring. http://en.wikipedia.org/wiki/HTTP_302.

自从我播放.htaccess文件以来已经有一段时间了,但是看起来它正在重定向到网站的根目录,听起来您的上传器脚本不在网站的根目录中.这可能是错误的根源.

It's been a while since I played with .htaccess files but it looks like it's redirecting to the site's root, and it sounds like your uploader script isn't in the site root. This could be the source of your error.

这篇关于文件上传器返回错误302的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆