Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mod_rewrite 'compiled in' but not working

Status
Not open for further replies.

TSMJ

MIS
Nov 27, 2002
83
0
0
Hi
I want to get mod_rewrite working. The commend "httpd -l" says that mod_rewrite.c is "compiled in", and phpinfo() also says that is compiled into apache. There is no mod_rewrite "LoadModule" line in httpd.conf.

I've added the following to the virtualhost 'mysite.com':
Options FollowSymLinks
RewriteEngine on

And tried the following to test it:
Trying to achieve this: mysite.com/check/1.php --> mysite.com/index.php
1. Created a .htaccess file in '/check' containing the following:
RewriteEngine On
RewriteBase /
RewriteRule ^check/1\.php$ /index.php [L]

2. Placed index.php in the root of 'mysite.com'

And it doesn't work - when you type you get a 404 (that 1.php doesn't exist - when it does you get 1.php displayed).

The reason I want it working is so that WordPress can work properly. WP works to a certain extent but it won't allow me to create new blogs as a new user and the setup 'wizard' complains that mod_rewrite is not installed.

Cheers - it would be such a relief to get this working.

TJ
 
TSMJ,

Which version of Apache are you running?

In my httpd.conf (Apache 1.3.31), I have:

LoadModule rewrite_module libexec/apache/mod_rewrite.so
AddModule mod_rewrite.c

The problem might potentially be in how you write your RewriteRules, but I expect that WordPress would do this for you.

Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
Hi
I'm running Apache2 on Linux - mod_rewrite is compiled into Apache, so you don't have any of the Load/AddModule line in httpd.conf.

I don't understand what the problem is, becuase Apache says its running, but everything else says it isn't.
 
OK - got it working(!)
The problem doesn't seem to have been with mod_rewrite.

I looked in the Apache error log for that virtualhost and it was full of "PHP Warning: Call-time pass-by-reference has been deprecated" errors, so I set "allow_call_time_pass_reference" to "true" in php.ini, and there is no longer the same problem.

Cheers

TJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top