-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathq2uri.php
45 lines (37 loc) · 1.13 KB
/
q2uri.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/**
* @author by sanljiljan
* @web http://codecanyon.net/item/real-estate-agency-portal/6539169
* @date 20th December, 2014
* @copyright No Copyrights on that file, but please link back in any way
*/
/*
|---------------------------------------------------------------
| CASTING argc AND argv INTO LOCAL VARIABLES
|---------------------------------------------------------------
|
*/
//
// Example for search seo optimization via mod rewrite for codeigniter
//
//.htaccess file content:
//Options +FollowSymlinks
//RewriteEngine on
//RewriteRule ^(.*)\.htm$ /q2uri.php?search=$1 [NC]
//
//Then usage should be:
//zagreb.htm will be rewrited to:
//index.php?search=zagreb
$_SERVER['PATH_INFO'] = '/';
$_SERVER['REQUEST_URI'] = '/index.php?search='.$_GET['search'];
$_SERVER['SCRIPT_NAME'] = '/index.php';
/*
|---------------------------------------------------------------
| PHP SCRIPT EXECUTION TIME ('0' means Unlimited)
|---------------------------------------------------------------
|
*/
set_time_limit(0);
require_once('index.php');
/* End of file test.php */
?>