Alain Roger wrote:
Ok, then
1) I think that the subject of your message is not very good, if you
want to get answers. Your problem is not really in httpd.conf and
htaccess, it is a problem with mod_rewrite, and you should say so in the
subject, to attract the mod_rewrite specialists, of which I am not.
2) I started using mod_rewrite myself last week, so my knowledge about
it is rather limited. But I would suggest this :
- forget the .htaccess file for now, and since this is your own test
server, move the Rewrite lines into http.conf, at the end.
So, at the end of httpd.conf, add :
RewriteEngine on
RewriteLog /path-to-logfile
RewriteLogLevel 9 (to get a logfile with full details)
RewriteRule ^error.html$ find.html [L]
then restart your server, retry your access, and look at the logfile
/path-to-logfile above.
That's the purpose of the logfile, to help you see what happens.
mod_rewrite will tell you step by step what it does to the original URL,
up to the resulting URL.
Even not being a mod_rewrite specialist, I would also suggest to modify
your rewrite rule as follows then :
RewriteRule ^/(.*)/error.html$ /$1/find.html [L]
Hi Andre,
ok, basically i'm just testing at home the mod_rewrite module from apache,
so i took an example from internet.
basically when i type http://my.IP.address/se_internet/error.html in my
browser address bar, i should be redirected (apache should rewrite address
as) to http://my.IP.address/se_internet/find.html.
is it clearer ?
to do so, i need to have an .htaccess file where i wrote thi RewriteRule.
instead of doing so (rewrite address), my browser displays a 400 error
message :-(
here are my files:
# --- httpd.conf ---
Alias /se_internet/ "L:/Webserver/se/internet/"
<Directory "L:/Webserver/se/internet/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
# --- .htaccess ---
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^error.html$ find.html [L]
under my browser FF3, when i run
http://my.IP.address/se_internet/error.html,
instead to redirect me on http://my.IP.address/se_internet/find.html, i
get
a nice 400 error message:
Bad Request Your browser sent a request that this server could not
understand.
any idea ?
Hi Alain.
Someone might be willing to help, but you are not being very clear about
what you want to do, what is supposed to do it, or when..
Above you say : instead to redirect me...
What exactly is supposed to re-direct what ? the part of your configuration
file that you copied does not show anything that should redirect anywhere.
Can you provide the whole httpd.conf maybe ?
André
---------------------------------------------------------------------
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: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
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: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]