All pastes #215520 Raw Edit

Stuff

public text v1 · immutable
#215520 ·published 2006-10-22 17:46 UTC
rendered paste body

##########file httdp.conf###########

<Directory "/path/hanny">
Options Indexes +FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
Allow from all
</Directory>


##########file catalog.php###########

<?
if (($list == "baju") && ($product == "laki")){
echo "rewrite success";
}else{
echo "rewrite field";
}
?>


#########file .htaccess############

RewriteEngine On
RewriteBase /

#RewriteCond %{QUERY_STRING} ^cat\=([^&]+)\&product\=([^&]+)$
#RewriteRule ^$ /catalog/%1-%2.html [R=301,L]

RewriteRule ^catalog/([^/]+)-([^/]+)\.htm$ /catalog.php?list=$1&product=$2 [L]


And try:

http://203.130.254.3/hanny/catalog.php?list=baju&product=laki
"rewrite success"

http://203.130.254.3/hanny/catalog/baju-laki.html
"rewrite field"