LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 03-18-2008, 04:20 AM   #1
FormalLogic
LQ Newbie
 
Registered: Mar 2008
Posts: 10

Rep: Reputation: 0
Mod Rewrite - Apache


Hi There,
I'm running a test web server with virtualhosts and Mod rewrite enabled. My query is: how can I give access to Mod Rewrites custom rules but not to httpd.conf? Ie from a security point of view each user must be able to implement Mod Rewrite from their own directory using .htaccess files or some other method. They must not be able to have access to anything above their directory and obviously not to top level httpd settings. Is this possible with Mod Rewrite and how?
Thanks a million
 
Old 03-18-2008, 10:21 PM   #2
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
Not sure if I'm oversimplifying your request, but..

as long as allowoverrides is turned on for the user's homedirs, a user can use rewrite rules in their .htaccess. e.g. one of my .htaccess files on my shared webserver looks like:

Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?myserver\.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ http://myserver.com/test/createImage.php [R,L]
... and that exists in only one subdir of my site, all others operate normally, i.e. no rewrite rules.
 
Old 03-19-2008, 01:30 AM   #3
FormalLogic
LQ Newbie
 
Registered: Mar 2008
Posts: 10

Original Poster
Rep: Reputation: 0
Smile Thanks

Simple is good, I like simple
Thanks for answering. Now at least I can tell the clients, 'yes it is possible, you have the .htaccessw files go find out how to do it'.
Kind Regards
Shane
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2 mod vhost_alias - problems with .htaccess mod rewrite d_t_baker Linux - Server 1 08-16-2007 07:32 PM
Warn: Apache Mod-Rewrite vulnerability Capt_Caveman Linux - Security 0 07-30-2006 08:09 PM
compile apache source rpm with mod rewrite robertngo Linux - Software 3 07-21-2005 03:44 AM
Mod Rewrite Help carminejg3 Linux - Software 0 12-20-2004 05:19 PM
apache mod rewrite Robert0380 Linux - Software 5 07-31-2003 04:42 PM


All times are GMT -5. The time now is 06:22 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration