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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux