LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-13-2010, 02:33 AM   #1
nuttynibbles
Member
 
Registered: Apr 2010
Posts: 59

Rep: Reputation: 0
doing alias in .htaccess


hi everyone,

im working on a web project which involves user uploading images. i would like to move the upload directory outside of public_html folder. I understand I can easily do this with Alias in httpd.conf file. But how can I do the same on .htaccess??

Thank you.
 
Old 08-13-2010, 03:06 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

You cannot have an Alias in .htaccess, so I guess that the only way to go is to create a symlink and use .htaccess to enable "Options FollowSymLinks" if not already enabled.

Regards
 
Old 08-13-2010, 04:35 AM   #3
nuttynibbles
Member
 
Registered: Apr 2010
Posts: 59

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
Hi,

You cannot have an Alias in .htaccess, so I guess that the only way to go is to create a symlink and use .htaccess to enable "Options FollowSymLinks" if not already enabled.

Regards
Hi, Im using a shared hosting and I don't have access to SSH. so I believe there's no way for me to create symLink.
 
Old 08-13-2010, 05:27 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
If you don't have ssh access how can you create a directory to put uploaded files in?
 
Old 08-13-2010, 05:34 AM   #5
nuttynibbles
Member
 
Registered: Apr 2010
Posts: 59

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
If you don't have ssh access how can you create a directory to put uploaded files in?
Hi,

I believe FTP access and SSH access are different. Im using FileZilla with an FTP account. This account allows me to create directory. But im certain I cannot login through putty to create directories and symlinks.
 
Old 08-13-2010, 06:10 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
I mean how can you create a directory outside public_html? Or you have a homedir that is accessible through ftp and public_html is a subdir of it?
Anyway, if only ~/public_html is accessible through a web browser, then the directory in question should reside under public_html as I cannot think of another way for apache to access the filesystem without the Alias directive
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Wildcard email alias in /etc/alias file custangro Linux - Enterprise 1 10-02-2009 12:17 PM
IP alias? Machine name alias? JohnLocke Linux - Newbie 4 01-16-2008 12:21 PM
Alias question (2 commands for one alias) gflores Linux - Newbie 3 01-21-2006 12:40 AM
.htaccess kidestranged Linux - General 1 01-26-2004 10:18 AM
.htaccess raek Linux - Newbie 1 08-17-2002 11:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration