Forum Moderators: phranque

Message Too Old, No Replies

mod rewrite problem

redirecting to a bad address

         

jonge

10:02 am on Oct 7, 2006 (gmt 0)

10+ Year Member



This is a really strange problem with mod_rewrite. I've got this mod_rewrite:

RewriteEngine On
RewriteRule ^([^/]+)/$ /web/index.php?page=$1 [L,QSA]

This should rewrite
http://www.example.com/web/about/
to
http://www.example.com/web/index.php?page=about
but i rewrites it to
http://www.example.com/web/index.php?page=about.php

When i delete the .htaccess and i type in
http://www.example.com/web/about/
or
http://www.example.com/web/about
it automatically redirects me to http://www.example.com/web/about.php,
but i don't want that. What do i have to change in httpd.conf file?

I'm using Apache 2.0.59, PHP 5.1.6, MySQL 5.0.24a

P.S. It works on the server.

jdMorgan

1:00 pm on Oct 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Any code that causes a redirect should be pretty easy to spot.

Look for Redirect and RewriteRule directives as well as a possibly-misconfigured DirectoryIndex directive.

Jim