Guy1984
Guy1984

Reputation: 23

Files uploader return error 302

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/nameofcontrolpanel/public/uploader.

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.

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)

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 

The url for the uploader is uploader.mysite.com

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

Upvotes: 0

Views: 1914

Answers (1)

Josh
Josh

Reputation: 3475

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

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.

Upvotes: 1

Related Questions