Skip to content

Instantly share code, notes, and snippets.

View mooror's full-sized avatar
🚀
Working on our web platform

Benjamin mooror

🚀
Working on our web platform
View GitHub Profile
<?php
class ModelAdminFilteredViewExtension extends DataExtension
{
public function updateList(SS_List &$list)
{
$list = $list->filter($this->getFilters());
}
@RaVbaker
RaVbaker / readme.md
Created March 30, 2012 20:12
[HOWTO] Rewrite all urls to one index.php in Apache

Redirect All Requests To Index.php Using .htaccess

In one of my pet projects, I redirect all requests to index.php, which then decides what to do with it:

Simple Example

This snippet in your .htaccess will ensure that all requests for files and folders that does not exists will be redirected to index.php:

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-d