Re: Getting a simple mod_rewrite "Rewrite

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you for looking at this. I have added RewriteLog directive, so the Rewrite section now looks like this.

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

#LoadModule rewrite_module modules/mod_rewrite.so
#AddModule mod_rewrite.c
Options SymlinksIfOwnerMatch
RewriteEngine On
RewriteLog "/usr/local/apache2/logs/rewrite.log"
RewriteLogLevel 10
RewriteRule ^/$ /index.html.fr [L]

When the apache httpd server is restarted, the file "rewrite.log" is created, but no contents are created after testing with the url "http://127.0.0.1"; from a local browser AND the browser is not display the contents of /index.html.fr, but rather index.html...


On Jun 24, 2007, at 10:22 PM, Boyle Owen wrote:

-----Original Message-----
From: Eraticus Majoricus [mailto:eraticus@xxxxxxxxx]
Sent: Monday, June 25, 2007 8:02 AM
To: users@xxxxxxxxxxxxxxxx
Subject:  Getting a simple mod_rewrite "Rewrite

Apache users,

I have had a problem with the use of mod_rewite. I'm hoping that
someone can point me in the right direction...

To test the usage of mod_rewrite, I am trying to direct users who
connect to "/" to get /index.html.fr, that is, the French version of
the default home page. In order to do this, I have added this to the
httpd.conf file:

#LoadModule rewrite_module modules/mod_rewrite.so
#AddModule mod_rewrite.c
Options SymlinksIfOwnerMatch
RewriteEngine On
RewriteRule ^/$ /index.html.fr [L]

This seems to have no effect at all. If I have a syntax error in my
RewriteRule directive, I receive an error, but if it is correct, it
seems not to affect the behavior of httpd in the least.

The test platform is a Mac running OS 10.4. The version of httpd is
2.2 compiled fresh.

I would be thankful for any help at all.

As a general tip, whenever you have problems understanding what
mod_rewrite is doing, switch on the RewriteLog
(http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritelog)

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP
Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. The sender's company reserves the right to monitor all e-mail communications through their networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux