RewriteEngine on
RewriteRule ([a-zA-Z]{1,})-([0-9]{1,}).html$index.php?action=$1&id=$2
程式碼:
echo '你的Action是:' . $_GET['action'];
echo "
";
echo '你的ID是:' . $_GET['id'];
?>
現在在瀏覽器中輸入:
localhost/page-18.html
但是報錯:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.