I've been trying to run a project in progress on a live environment, but just can't get the .htaccess right. In despite to most people, we decided to not use things like $url
, but instead do it like this:
$url = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : null;
$url = ltrim($url, '/');
$url = rtrim($url, '/');
$url = filter_var($url, FILTER_SANITIZE_URL);
$this->_url = explode('/', $url);
The .htaccess exists of:
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/ [L,QSA]
Anyone has an idea of what I'm doing wrong? I'm aware of my noobness in php and even more noob in the .htaccess file, but I'd very much like to have this fixed, especially with the future in mind :p