Forum Moderators: phranque

Message Too Old, No Replies

mod rewrite and mod userdir conflict?

         

maliskoleather

2:50 am on Apr 9, 2008 (gmt 0)

10+ Year Member



I'm working on a project right now that uses mod_rewrite to make pretty url's for an MVC system. This works great on the CentOS test server, as well as our development boxes (various versions of windows).

However, on one box that uses mod_userdir, anytime that it rewrites the url, it seems to be coming out goofy. What should be converted from


http://localhost/~foo.com/admin/user/login

to

http://localhost/~foo.com/admin/index.php?page=user/login

ends up being redirected to

http://localhost/C:/Websites/foo.com/trunk/public_html/admin/index.php?page=user/login

the .htaccess in the admin folder looks like this:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?page=$1 [R,L,QSA]

so, is there some issue with mod_userdir and mod_rewrite, or did I just really jack something up?

jdMorgan

2:16 pm on Apr 9, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



See Apache mod_rewrite's RewriteBase directive. If that does not help, then replace mod_userdir's functionality with your own mod_rewrite code version, so that you can control order of execution between the mod_userdir and rewrite-to-MVC functions.

Jim