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


  Search this Thread
Old 03-18-2008, 05:20 AM   #1
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, 11:21 PM   #2
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:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?myserver\.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ [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, 02:30 AM   #3
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


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 08:32 PM
Warn: Apache Mod-Rewrite vulnerability Capt_Caveman Linux - Security 0 07-30-2006 09:09 PM
compile apache source rpm with mod rewrite robertngo Linux - Software 3 07-21-2005 04:44 AM
Mod Rewrite Help carminejg3 Linux - Software 0 12-20-2004 06:19 PM
apache mod rewrite Robert0380 Linux - Software 5 07-31-2003 05:42 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:16 AM.

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