Re: Apache odd behavior

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

 




I'm submitting a url like this:

http://mysite.com/index.php/alfa/bravo/charlie/delta

The index.php calls has code to decode the url segments
(alfa/bravo/charlie/delta). It determines that the controller is alfa,
the method is bravo, and converts charlie and delta to $_GET['charlie']
= 'delta'. It verifies that the controller and method exist, and calls
the controller and method.

This works fine. The right controller gets called and the right method,
and the GET parameter looks like it should. The method sets some
variables and then calls a render() function to render the page, which
is in the doc root of the site.

The page does get rendered, but without the stylesheet, and none of the
graphics show up. Why? Because, according to the logs, Apache appears to
be looking for the images and everything else in the directory
index.php/alfa/bravo/charlie/delta, which of course doesn't exist.

No, I don't have an .htaccess file with RewriteEngine on. Apache figures
out that index.php is the file to look for in the original URL, but
can't figure out that everything else is relative to that file, not the
entire URL.

This method is in use in at least one other MVC framework. What am I
doing wrong?

Paul


I assume that in order for this to work you will have to use mod_rewrite for apache to work properly. Check the framework's installation instructions to see if you configured mod_rewrite correctly for this to work properly.

--
Thodoris


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux