The requested URL /line/56/ampppp was not found on this server
code
หน้า แสดงผล ที่รับค่าจาก &_GET Code (PHP)
<?php
include('connect.inc.php');
mysql_query("UPDATE member SET m_view=(m_view+1) WHERE m_id = '".$_GET["id"]."' AND m_line = '".$_GET["line"]."'" );
if($_GET[id] && $_GET[line] =="");
$sqls="SELECT * FROM member where m_id ='".$_GET[id]."' AND m_line = '".$_GET[line]."'";
$results=mysql_query($sqls);
$num=mysql_num_rows($results);
if($num<1){header("Location: index.php");exit();}
$row=mysql_fetch_array($results);
?>
code URL Rewrite
Code
RewriteEngine on
RewriteRule ^/?line/([^/]*)$ /line.php?id=$1&line=$2 [NC,L]
<?php
include('connect.inc.php');
mysql_query("UPDATE member SET m_view=(m_view+1) WHERE m_id = '".$_GET["id"]."' AND m_line = '".$_GET["line"]."'" );
if($_GET[id] AND $_GET[line] ==""){header("Location: index.php");exit();}
$sqls="SELECT * FROM member where m_id ='".$_GET[id]."' AND m_line = '".$_GET[line]."' ";
$results=mysql_query($sqls);
$num=mysql_num_rows($results);
if($num<1){header("Location: index.php");exit();}
$row=mysql_fetch_array($results);
?>
#REWRITE index.php
#START USING REWRITE ENGINE
RewriteEngine On
#REWRITE CONDITON
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#WHEN YOU FOUND index.php IT WILL REWRITE To / AUTOMATICALLY
RewriteRule line(/.*)* /line.php/$0 [PT,L]