[Nottingham] mod_rewrite problems

Haber Mike Mike.Haber at nottingham.ac.uk
Thu Aug 3 14:21:26 BST 2006


Hi,
Solved, RewriteEngine on and the Rewrite rules should be outside the
<Directory> section in the virtual host.
:-)
Logging doesn't work still.
Mike 

> -----Original Message-----
> From: nottingham-bounces at mailman.lug.org.uk 
> [mailto:nottingham-bounces at mailman.lug.org.uk] On Behalf Of Haber Mike
> Sent: 03 August 2006 10:42
> To: nottingham at mailman.lug.org.uk
> Subject: [Nottingham] mod_rewrite problems
> 
> Hi All,
> I'm having some difficulty getting mod_rewite to work; Apache 
> 2.0 on debian sarge.
> 
> /etc/apache2/apache2.conf contains;
> 
> RewriteLog /var/log/apache2/rewrite.log
> RewriteLogLevel 2
> 
> File permissions of log file;
> -rw-r-----  1 root adm 0 2006-07-31 14:45 /var/log/apache2/rewrite.log
> 
> /etc/apache/sites-available/default contains
> 
> <Directory /var/www/>
>                 RewriteEngine on
>                 Options Indexes FollowSymLinks MultiViews
>                 AllowOverride All
>                 Order allow,deny
>                 allow from all
> 
>                 #RewriteRule   ^/$  /site/   [R]  # Doesn't work - no
> log
>                 RedirectMatch   ^/$  /site/  [R]  # Works - no log
> </Directory>
> 
> The examples taken above from the apache site, so I reckon 
> they should work OK, but there is no logging and while the 
> RedirectMatch works fine, the RewriteRule doesn't.
> I'm trying to deliver content for www.server.com/ from 
> server:/var/www/site.
> Any help appreciated.
> Thanks
> Mike H
> 
> This message has been checked for viruses but the contents of 
> an attachment may still contain software viruses, which could 
> damage your computer system:
> you are advised to perform your own checks. Email 
> communications with the University of Nottingham may be 
> monitored as permitted by UK legislation.
> 
> 
> _______________________________________________
> Nottingham mailing list
> Nottingham at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/nottingham
> 

This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.




More information about the Nottingham mailing list