Forum Moderators: phranque

Message Too Old, No Replies

.htaccess doesn't work

problem with apache 1.3.23

         

Bildr

9:22 am on Apr 21, 2007 (gmt 0)

10+ Year Member



hi all, i got a problem with apache 1.3.23 and .htacces file (i want to test my rewrite rules) with doesn't working. in httpd.conf i allowed this lines:

LoadModule rewrite_module modules/mod_rewrite.so
AddModule mod_rewrite.c

also i set all "Options" and "AllowOverride" to "All". i'm trying mod rewrite on this simply .htacces file in blah directory:

RewriteEngine on
RewriteRule blah\.html index.php

calling localhost/blah/blah.html from browser ending by 400: bad request. i'm hopeless at this. any ideas?

jdMorgan

3:17 pm on Apr 21, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you mean ".htaccess" file?
And do you mean "calling localhost://blah/blah.html"?
What are the settings of ServerName, ServerAlias, and UseCanonicalName?

Jim

Bildr

4:27 pm on Apr 21, 2007 (gmt 0)

10+ Year Member



sorry, i mean ".htaccess" and "http://localhost ..."

ServerName is "localhost"
UseCanonicalName is "On"
and ServerAlias isn't on my httpd.conf file

Bildr

4:30 pm on Apr 21, 2007 (gmt 0)

10+ Year Member



correction: url is [localhost...]

jdMorgan

12:04 am on Apr 22, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would suggest looking at the server access log and the server error log to see if you can spot any obvious problems. 400-Bad request is a pretty serious error, so it may be easy to spot.

Jim

Bildr

2:23 pm on Apr 22, 2007 (gmt 0)

10+ Year Member



There's no errors in log about this file.

System

3:44 pm on Apr 22, 2007 (gmt 0)

redhat



The following message was cut out to new thread by jdmorgan. New thread at: apache/3318352.htm [webmasterworld.com]
1:52 pm on April 22, 2007 (CDT -5)

jdMorgan

6:59 pm on Apr 22, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Bildr,

I'm sorry, but you are not giving us any useful information to work with here. I suggest that you either remove the .htaccess code, or try a very simple test such as redirecting a non-existent page URL to your home page -- all in the Web root directory to start with. We can help, but you are going to need to do most of the work --a lot of experimenting-- and report the results of things that work as well as things that don't work.

And if something does not work, we need to know:

  • What was the code?
  • What was it intended to do?
  • What did it actually do?
  • how does what it actually did differ from what you intended it to do?
    Also please report the relevant content of both your server access log and your server error log when you have a problem.

    Thanks,
    Jim

  •