Mailing List Archive

mod_rewrite doesn't work
I am running apache v. 1.3.22 and can't get mod_rewrite to do its job at all.
Lines in httpd.conf in the outter server config section:
----------
RewriteEngine on
RewriteLog "/etc/httpd/logs/rewrite.log"
RewriteLogLevel 9
RewriteRule ^/cal/abc\.html$ /index.html
---------

If I try to access the URL http://the-server/cal/abc.html no translation occurs and I just receive a Not Found for the /cal/abc.html.
The log file above records nothing at all.

Any ideas?
RE: mod_rewrite doesn't work [ In reply to ]
You nead to add a RewriteRule that will add the server name :

RewriteRule ${lowercase:%{SERVER_NAME}}$1 [C]

Verify that UseCanonicalName if Off, if you want SERVER_NAME to include
the original domain in the request.


-----Original Message-----
From: Rodrigo Werneck Silva [mailto:rodrigo@labhpardini.com.br]
Sent: Wednesday, February 27, 2002 5:58 PM
To: users@httpd.apache.org
Subject: mod_rewrite doesn't work



I am running apache v. 1.3.22 and can't get mod_rewrite to do its job at
all.
Lines in httpd.conf in the outter server config section:
----------
RewriteEngine on
RewriteLog "/etc/httpd/logs/rewrite.log"
RewriteLogLevel 9
RewriteRule ^/cal/abc\.html$ /index.html
---------

If I try to access the URL http://the-server/cal/abc.html
<http://the-server/cal/abc.html> no translation occurs and I just receive a
Not Found for the /cal/abc.html.
The log file above records nothing at all.

Any ideas?





**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************
Re: mod_rewrite doesn't work [ In reply to ]
Did you mean:

RewriteRule ^(.+) ${lowercase:%{SERVER_NAME}}$1 [C]
preceding my original RewiteRule?
Neither did worked. Log file keeps empty.
Any other suggestion?

----- Original Message -----
From: Dror Braznitzki
To: 'users@httpd.apache.org'
Sent: quarta-feira, 27 de fevereiro de 2002 13:03
Subject: RE: mod_rewrite doesn't work


You nead to add a RewriteRule that will add the server name :

RewriteRule ${lowercase:%{SERVER_NAME}}$1 [C]

Verify that UseCanonicalName if Off, if you want SERVER_NAME to include
the original domain in the request.



---------------------------------------------------------------------
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@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: mod_rewrite doesn't work [ In reply to ]
change your RewriteRule with
RewriteCond %{REQUEST_FILENAME} ^/cal/abc\.html$
RewriteRule .+ /index.html [PT]

rtfm is probably a good answer here too =)

îÁ 2002.02.27 17:57 Rodrigo Werneck Silva ÎÁÐÉÓÁÌ:
> I am running apache v. 1.3.22 and can't get mod_rewrite to do its job
> at all.
> Lines in httpd.conf in the outter server config section:
> ----------
> RewriteEngine on
> RewriteLog "/etc/httpd/logs/rewrite.log"
> RewriteLogLevel 9
> RewriteRule ^/cal/abc\.html$ /index.html
> ---------
>
> If I try to access the URL http://the-server/cal/abc.html no
> translation occurs and I just receive a Not Found for the
> /cal/abc.html.
> The log file above records nothing at all.
>
> Any ideas?
>
>
>

---------------------------------------------------------------------
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@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org