Just can not start the mod_rewrite
Submitted by corel123 on Wed, 06/04/2005 - 03:16.
Open Source
I am new bie to mod_rewrite and before I can digest the mass of the howto in regular expression, I just want to begin my mod_rewrite function as helloworld, but neither the below setting(all in the root context of httpd.conf) fail, didnt work at all.
case A:
LoadModule rewrite_module modules/mod_rewrite.so
RewriteEngine On
RewriteRule ^old\.html$ index.html [L]
RewriteLog /usr/local/apache/apache2.0.44/logs/rewrite.log
case B:
LoadModule rewrite_module modules/mod_rewrite.so
RewriteEngine On
RewriteRule ^hello\.java\.net\.nl$ http://www.java.net.nl/hello/test.jsp
RewriteLog /usr/local/apache/apache2.0.44/logs/rewrite.log
Not only it response nothing(404), but also I found nothing in the rewrite.log,too; but in the access_log, I can found the records as below:
[05/Apr/2005:23:33:23 -0400] 0 "GET /old.html HTTP/1.1" 404 206 "- -> /old.html"
192.168.0.11 - - [05/Apr/2005:23:55:43 -0400] 0 "GET / HTTP/1.1" 400 0 "- -> /index.jsp"
the behind one logged for hello.java.net.nl request, however, seems response by the behind virtualhost setting:
ServerName www.java.net.nl
DocumentRoot /home/jakarta/tomcat5/webapps/app
however, the /index.jsp is existed but do not response,too.(it is not this topic, just skipped)
I thought the mod_rewirte didnot work at all? am I right?
what I has not to do but necessary?my system is apache2.0.44, all install by one complie, the mod_rewirte inside as default.
After one whole day in researching in the mod_rewrite but just can not start even the simplest, further more, I have little idear about the whole thread of setting mod_rewrite. for example, What it choose by the RewriteRule one by one? there are no container additional to involve the RewriteRule and RewriteCondition; whether the RewriteCondition will only assigned to the next RewriteRule then stop by the next RewriteCondition?
Anyway, I do not think it is good idear to allocat the Rewrite-series in the httpd.conf or similar, it should be devorced to one independant setting file, like
RewriteSetup /usr/local/apache/conf/setting.conf
something like that, furthermore, no need to match the custom format of httpd.conf, but also like program flowchart, there are so many current scripts can be used.
right now, I have cost more than two or three hours total to questions on forums on the world, only want for help can start. but got no reply right yet. as long as no other help come to, there is only way to continue on some kind, that just complie new one by myself, whether to do now?
case A:
LoadModule rewrite_module modules/mod_rewrite.so
RewriteEngine On
RewriteRule ^old\.html$ index.html [L]
RewriteLog /usr/local/apache/apache2.0.44/logs/rewrite.log
case B:
LoadModule rewrite_module modules/mod_rewrite.so
RewriteEngine On
RewriteRule ^hello\.java\.net\.nl$ http://www.java.net.nl/hello/test.jsp
RewriteLog /usr/local/apache/apache2.0.44/logs/rewrite.log
Not only it response nothing(404), but also I found nothing in the rewrite.log,too; but in the access_log, I can found the records as below:
[05/Apr/2005:23:33:23 -0400] 0 "GET /old.html HTTP/1.1" 404 206 "- -> /old.html"
192.168.0.11 - - [05/Apr/2005:23:55:43 -0400] 0 "GET / HTTP/1.1" 400 0 "- -> /index.jsp"
the behind one logged for hello.java.net.nl request, however, seems response by the behind virtualhost setting:
ServerName www.java.net.nl
DocumentRoot /home/jakarta/tomcat5/webapps/app
however, the /index.jsp is existed but do not response,too.(it is not this topic, just skipped)
I thought the mod_rewirte didnot work at all? am I right?
what I has not to do but necessary?my system is apache2.0.44, all install by one complie, the mod_rewirte inside as default.
After one whole day in researching in the mod_rewrite but just can not start even the simplest, further more, I have little idear about the whole thread of setting mod_rewrite. for example, What it choose by the RewriteRule one by one? there are no container additional to involve the RewriteRule and RewriteCondition; whether the RewriteCondition will only assigned to the next RewriteRule then stop by the next RewriteCondition?
Anyway, I do not think it is good idear to allocat the Rewrite-series in the httpd.conf or similar, it should be devorced to one independant setting file, like
RewriteSetup /usr/local/apache/conf/setting.conf
something like that, furthermore, no need to match the custom format of httpd.conf, but also like program flowchart, there are so many current scripts can be used.
right now, I have cost more than two or three hours total to questions on forums on the world, only want for help can start. but got no reply right yet. as long as no other help come to, there is only way to continue on some kind, that just complie new one by myself, whether to do now?
