You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Mike Johnson <mi...@smarterliving.com> on 2005/08/29 22:01:12 UTC

[users@httpd] upgraded to 2.0, mod_rewrite stopped working

Hi all,

I recently moved my site to a new host. The previous one was running
httpd 1.3.27, and the new host is running httpd 2.0. On the old server,
I had the following in the httpd.conf VirtualHost container for the site
in question:

<IfModule mod_rewrite.c>
RewriteEngine on
# the following rewrites, for instance, /reviews/109 to
/reviews/index.php?id=109
# can also take a trailing slash, such as /reviews/109/
RewriteRule ^/(.*)/([0-9]+)/?$ /$1/index.php?id=$2
</IfModule>

It's the classic SEO-friendly rewrite, to make friendlier URLs. This
worked fine on the old server. I copied it over to the new server,
though, and no dice. I've been doing some reading, and am aware that
AddModule was dropped in 2.0, etc.

Here're the new lines, in the same VirtualHost container:

RewriteEngine on
# the following rewrites, for instance, /reviews/109 to
/reviews/index.php?id=109
# can also take a trailing slash, such as /reviews/109/
RewriteRule ^/(.*)/([0-9]+)/?$ /$1/index.php?id=$2
RewriteRule ^/test$ http://www.google.com/

The first rule, as said before, doesn't work. It simply drops the user
at DocumentRoot. The second one works, though, so I know mod_rewrite
/is/ working in some capacity.

My question -- is there something I'm overlooking or missing in the move
to 2.0? Did ruleset syntax change, or anything like that?

Thanks in advance if anyone can help me on this. I'm Googled out.   :)

-- 
Mike Johnson

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org