Forum Moderators: phranque

Message Too Old, No Replies

mod_rewrite still won't work after hours of trying

Need help with AppServ 2.1.0 (Apache 1.3.27, php 4.3.3RC1, mysql 4.0.13.)

         

ocelot

2:12 am on Nov 26, 2004 (gmt 0)

10+ Year Member



ugh I've spent so long sloggin away at this...

I installed a package called AppServ 2.1.0, which includes apache 1.3.27, php 4.3.3RC1, and mysql 4.0.13.

It works perfectly for everything I've done with it so far. I just can't get it to work for any mod_rewrite stuff.

Here's the simple test I'm trying to get working now:

I want old.html to redirect to new.html so I put a .htaccess file in the dir that contains old.html and new.html which says:

RewriteEngine On
RewriteRule ^old\.html$ new.html

without changing anything else, when I load old.html, it gives me old.html instead of new.html.

the default of AllowOverride, however is None, which should cause that problem. But when I change it to All, I get a 500 server error. I've tried changing a million other things to no avail. And now I reinstalled AppServ so it's all fresh and default and tried it again. But it's the same thing!

What's going on here?!

let me know if you'd like me to post any parts of my files such as httpd.conf or whatever

jdMorgan

3:16 am on Nov 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ocelot,

Set AllowOverride FileInfo Options at a minumum.
Then in your .htaccess file, add Options +FollowSymLinks (You could also put this in httpd.conf).

Whenever you have a problem, examine your server error log file. In this case, it probably would have indicated the need for FollowSymLinks, which is needed to enable mod_rewrite.

Jim

ocelot

6:20 am on Nov 26, 2004 (gmt 0)

10+ Year Member



sorry that didn't work. I made the changes you suggested. but whenever I change either of the two AllowOverride's in httpd.conf to anything besides "None", I get 500 internal server error

The error log doesn't mention anything about it.

jdMorgan

4:26 pm on Nov 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> The error log doesn't mention anything about it.

:o ... If you are getting a 500-Server Error and there is nothing in your error, log, then that's the first thing that needs attention...

Check your LogLevel setting, and make sure it's set at error or warn for now.

If it's already set to one of those, or is missing (Apache defaults to warn) then there's something wrong beyond mod_rewrite not working. Maybe it's not compiled-in or loaded.

Jim

ocelot

6:38 pm on Nov 26, 2004 (gmt 0)

10+ Year Member



well loglevel was set to "warn", but I changed it to "error" just for kicks.

as far as mod_rewrite not being "compiled in or loaded", I'm not quite sure what you mean, but did change

#LoadModule rewrite_module modules/mod_rewrite.so
to
LoadModule rewrite_module modules/mod_rewrite.so

before posting this thread

ocelot

6:39 pm on Nov 27, 2004 (gmt 0)

10+ Year Member



anybody have an idea?

Storyman

7:53 pm on Nov 27, 2004 (gmt 0)

10+ Year Member



ocelot,

If you haven't already looked at manual for rewriting this should help:
[httpd.apache.org...]

Storyman

8:55 pm on Nov 27, 2004 (gmt 0)

10+ Year Member



Ocelot,

Try putting this on the first line of your .htaccess file.

DirectoryIndex index

I have no idea why it makes a difference, but it has worked for me in the past.

ocelot

10:29 pm on Nov 27, 2004 (gmt 0)

10+ Year Member



nope...
but now I'm getting this message in errors.log:

Cannot remove module mod_rewrite.c: not found in module list

also, I don't think the problem is with my .htaccess file because everytime I change

#
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
AllowOverride None

to anything besides None, I get a 500 internal server error

Storyman

10:57 pm on Nov 27, 2004 (gmt 0)

10+ Year Member



Ocelot,

Maybe there is something particular to your hosting system. Does your web hosting company have a forum? If not, contact them if there is anything about .htaccess that you should know because the script works on other systems.

Some web hosting companies don't like to provide technical support, but in this case you need to know if there is anything about the system that is being overlooked.

ocelot

2:14 am on Nov 28, 2004 (gmt 0)

10+ Year Member



storyman, like I said I'm using a local apache host installed by AppServ (a quick installer that installs mysql, apache, and php). I did a google on appserv and .htaccess, and didn't see anything about problems with it

jdMorgan

4:11 pm on Nov 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Anybody else here using AppServ?

<bump>

Jim