mod_rewrite not working

provender

Verified User
Joined
Aug 19, 2007
Messages
13
I'm having trouble getting mod_rewrite to work. I think it may have something to do with the virtual hosts (since I was able to get it working on a single hosted server), but I'm not certain at this point. I'm using Apache 2.0.63.

If I look at a php_info page I see mod_rewrite loaded (also if I check loaded modules in apache from the command line) so I assume that it is ready to go.

In my main httpd.conf I have:
Code:
<Directory />
     Options FollowSymLinks
     AllowOverride All
</Directory>
and
Code:
<Directory /home/* />
     AllowOverride All
     Options -MultiViews -Indexes FollowSymlinks IncludesNoExec +Includes
     <Limit  GET POST OPTIONS PROPFIND>
          Order allow,deny
         Allow from all
     </Limit>
     <LimitExcept  GET POST OPTIONS PROPFIND>
         Order deny,allow
         Deny from all
     </LimitExcept>
</Directory>

I'm using an .htaccess file with the following:
Code:
RewriteEngine On
ReWriteRule ^topics/(\d+)/(.+) index.php?pglt=view_topics&topic_id=$1 [L]

I am getting a 404 error when attempting to get to the page.

The logfile says:
Code:
File does not exist: /home/admin/domains/sharedip/pages

I've tried increasing the log reporting to "9", but I don't seem to be getting any additional info.

I've also tried adding additional directives into the Custom HTTP for that site via DA, but also no luck.

I really need to get this working and I'm up against a deadline. I've read posts and googled until my eyes are blurry. Any ideas? Thanks...
 
Last edited:
Never mind

Never mind. It was a problem with the rewrite rule. Evidently under 2.x Apache it needed the "/" after index.php to work.
 
Back
Top