RewriteEngine On
RewriteRule ^.*$ index.php
file index.php
<?php
print 'mod_rewrite works!';
?>
Simply put this two files in /var/www/test_mod_rewrite and from the browser call localhost/test_mod_rewrite. "mod_rewrite_works!" should be printed
RewriteEngine On
RewriteRule ^.*$ index.php
<?php
print 'mod_rewrite works!';
?>
header('Content-Type: application/javascript');
sudo wget -O /etc/apt/sources.list.d/couchbase.list packages.couchbase.com/ubuntu/couchbase-ubuntu1204.list
wget -O- packages.couchbase.com/ubuntu/couchbase.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install libcouchbase2 libcouchbase-dev
sudo apt-get install php-pear
sudo pecl install couchbase
sudo apt-get install build-essentialUpdate php.ini with extension=couchbase.so and restart apache.
sh cbrestore /home/user/Descargas/backup2014-02-10 http://Administrator:password@localhost:8091 --bucket-source=demo --bucket-destination=demo
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');/*CUSTOM ROUTER FUNCTION TO CHECK FOR CITY SLUG PLUS CONTROLLERS */class MY_Router extends CI_Router{
public function __construct(){parent::__construct();$this->config =& load_class('Config', 'core');$this->uri =& load_class('URI', 'core');
require_once(BASEPATH.'database/DB'.EXT);$this->db = DB();}public function _set_routing(){$db_routes = $this->db->where('active', 1)->get('routes')->result();foreach ($db_routes as $route) {$this->routes[$route->slug] = 'coupons/index/' . $city->slug;$this->routes[$route->slug . '/(:any)'] = 'coupons/index/' . $city->slug . '/$1';}parent::_set_routing();}}
$this->routes = ( ! isset($route) OR ! is_array($route)) ? array() : $route;
$this->routes += ( ! isset($route) OR ! is_array($route)) ? array() : $route;