Apache:mod_rewrite syntax help please

Apache:mod_rewrite syntax help please

Post by Stev » Tue, 05 Aug 1997 04:00:00



If someone could help I would be most gratefull.

My problem (I'm not a mod_rewrte/reg_ex expert).

I have a login-page on my server and would like to restrict access to
the rest of the documents below the login-page based on the
HTTP_REFERER  variable.

I'd like to have:
access to /login                open to the world.
access to /login/dir            open only to those refered by /login
access to /login/dir/subdir     open only to those referred by a                                
document in /dir or /dir/subdir

I know mod_rewrite can re-direct a document based on the HTTP_REFERER
variable to point to /login if it is NULL or from another server but I
need help on the syntax.

M*of the story:
I don't want someone to simply type:
http://www.veryComputer.com/
verify through the login page his/her username / password / REMOTE_HOST
/ REMOTE_IDENT / hair color / shoe size / shampoo brand, yada, yada,
yada...

Also how difficult is it to 'fake' the http_referer variable providing I
look at the FQDN and not the document name?

Thanks in advance.

Steve /..

 
 
 

1. Apache, how to add mod_rewrite? Please help...

Hi all,

my web server was set up a year ago by a friend of mine who is no
longer available. He compiled in a lot of modules but not mod_rewrite.
Now I would like to use URL rewriting but - even after spending some
hours with FAQs, documentation and googleing - I still don't have a
clue.

The httpd.conf doesn't contain the usual large piece of "LoadModule xy
xy.so" ines so I can't just uncomment a few lines and everything works
fine. The only DSO that is loaded is "LoadModule php4_module
libexec/libphp4.so"

Now what do I have to do to add mod_rewrite to Apache? There IS a file
"mod_rewrite.so" in /usr/lib/apache/. Do I have to compile something?
Or is there just some magic LoadModule-line missing in my httpd.conf
to make the whole thing working?

Any help would be fine!

Adi Dax

2. Multiple connections to IRC from the same host

3. Need a mod_rewrite whiz to help with this..please!

4. driver for either newmedia scsi or d-link de-660

5. Please help: mod_rewrite

6. ftp only works when gateway connected(dialup)

7. mod_rewrite help please - blocking direct image linking

8. Help with CRON

9. Virtual User Hosts mod_rewrite help please.

10. Apache 1.3.4 - mod_rewrite issue - Apache 1.3.4

11. MOD_REWRITE QUESTION PLEASE HELP!!!!

12. help with mod_rewrite (apache 1.3.12, RH linux 6.2)

13. Apache newbie: help with mod_rewrite