Skip to content

Instantly share code, notes, and snippets.

View marcuswoy's full-sized avatar

Marcus Woyciechowski marcuswoy

View GitHub Profile
@marcuswoy
marcuswoy / gist:31ba4a7e770ff9e2faefc68e940c788d
Created November 13, 2022 16:15
[HOW TO] Redirect All Requests To Index.php Using .htaccess
# 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
import Ember from 'ember';
export default Ember.Controller.extend({
matcher(item, query) {
let rating = item.get('rating');
return rating.toLowerCase().indexOf(query.toLowerCase());
},
actions: {
import DS from 'ember-data';
export default DS.JSONAPIAdapter.extend({
namespace: 'api'
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@marcuswoy
marcuswoy / components.input-helper.js
Last active December 20, 2016 17:07
Input Example
import Ember from 'ember';
export default Ember.Component.extend({
tagName:'input',
attributeBindings:['type','style','value'],
});