Apache 2.0
GFM
t.co/uYwjP7J73B (page 126)
Internet Explorer(Internet Explorer 7)
Firefox(Firefox 3.0)
Google Chrome(Chrome 16)
Cupcake(Cupcake 0.2.4)
WebKit (Safari 4.0)
While following the.htaccess file of your Apache server, you will find the following lines:
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
You must use an internal redirect to keep the file count and the internal redirect URL clean and reduce the number of HTTP requests. When you are already within the rewritten URL, the external redirect is not needed.
.htaccess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteCond %{REQUEST_URI}!=/favicon.ico
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
index.php
$query = isset($_GET['q'])? $_GET['q'] : null;
if($query == null) {
// Process form data
$mysqli = new mysqli($host, $username, $password, $database);
$stmt = $mysqli->prepare("SELECT * FROM `items` WHERE `key` =?");
$stmt->bind_param("s", $query);
$stmt->execute();
$stmt->bind_result($key, $description, $year, $picture);
$stmt->fetch();
$stmt->close();
} be359ba680
Related links:
Comments