RewriteEngine On RewriteBase / #301重定向 RewriteCond %{HTTP_HOST} !www.hollisterukofficial.com [NC] RewriteRule ^(.*)$ http://www.hollisterukofficial.com/$1 [L,R=301] #配置文件 RewriteRule ^config.xml$ error.php?error=404 #首頁 RewriteRule ^index\.(htm|html|asp|aspx|jsp)$ index.php #受保護的目錄 RewriteRule ^_db_backups\/ error.php?error=404 RewriteRule ^_db_structure\/ error.php?error=404 RewriteRule ^_documents\/ error.php?error=404 RewriteRule ^templates\/ error.php?error=404 RewriteRule ^master\/templates\/ error.php?error=404 #後臺 RewriteRule ^master\/$ master/index.php RewriteRule ^master$ master/index.php #網站地圖 RewriteRule ^catalog$ web_catalog.php RewriteRule ^catalog\/$ web_catalog.php #功能頁面 RewriteRule ^checkout\/([a-zA-Z0-9-]+)\/$ checkout_$1.php RewriteRule ^checkout\/([a-zA-Z0-9-]+)$ checkout_$1.php RewriteRule ^search\/$ product_search.php RewriteRule ^search$ product_search.php RewriteRule ^account\/login$ account_login.php RewriteRule ^account\/login\/$ account_login.php RewriteRule ^account\/logout$ account_login.php?do=logout RewriteRule ^account\/logout\/$ account_login.php?do=logout RewriteRule ^account\/([a-zA-Z0-9-]+)\/$ account_$1.php RewriteRule ^account\/([a-zA-Z0-9-]+)$ account_$1.php RewriteRule ^contact-us$ web_contact.php RewriteRule ^contact-us\/$ web_contact.php #首信页面 RewriteRule ^payEase\/payment\.ticket$ payEase\/ticket\.php RewriteRule ^payEase\/payment\.result$ payEase\/result\.php #非3D RewriteRule ^payEase\/non3d\/payment\.ticket$ payEase\/ticket_non3d\.php #Paypal接口 RewriteRule ^paypal\/payment\.ticket$ paypal\/ticket\.php RewriteRule ^paypal\/payment\.result$ paypal\/result\.php #mastercard接口 RewriteRule ^mastercard\/payment\.confirm$ mastercard\/confirm\.php RewriteRule ^mastercard\/payment\.ticket$ mastercard\/ticket\.php RewriteRule ^mastercard\/payment\.result$ mastercard\/result\.php #文章頁面 RewriteRule ^pages\/([a-zA-Z0-9-]+)\/$ pages_view.php?path=pages&ppath=$1 RewriteRule ^pages\/([a-zA-Z0-9-]+)$ pages_view.php?path=pages&ppath=$1 #產品頁面 RewriteRule ^p_([a-zA-Z0-9-]+)\/([a-zA-Z0-9-]+)\/([a-zA-Z0-9-]+)\/$ product_view.php?path=$1,$2&ppath=$3 RewriteRule ^p_([a-zA-Z0-9-]+)\/([a-zA-Z0-9-]+)\/([a-zA-Z0-9-]+)$ product_view.php?path=$1,$2&ppath=$3 RewriteRule ^p_([a-zA-Z0-9-]+)\/([a-zA-Z0-9-]+)\/$ product_view.php?path=$1&ppath=$2 RewriteRule ^p_([a-zA-Z0-9-]+)\/([a-zA-Z0-9-]+)$ product_view.php?path=$1&ppath=$2 RewriteRule ^p_([a-zA-Z0-9-]+)\/([a-zA-Z0-9-]+)\/([a-zA-Z0-9-]+)\/addcart\/$ product_view.php?path=$1,$2&ppath=$3&do=addcart RewriteRule ^p_([a-zA-Z0-9-]+)\/([a-zA-Z0-9-]+)\/([a-zA-Z0-9-]+)\/addcart$ product_view.php?path=$1,$2&ppath=$3&do=addcart RewriteRule ^p_([a-zA-Z0-9-]+)\/([a-zA-Z0-9-]+)\/addcart\/$ product_view.php?path=$1&ppath=$2&do=addcart RewriteRule ^p_([a-zA-Z0-9-]+)\/([a-zA-Z0-9-]+)\/addcart$ product_view.php?path=$1&ppath=$2&do=addcart #產品目錄 RewriteRule ^c_([a-zA-Z0-9-]+)\/([a-zA-Z0-9-]+)\/([0-9]+)\/$ product_list.php?path=$1,$2&p=$3 RewriteRule ^c_([a-zA-Z0-9-]+)\/([a-zA-Z0-9-]+)\/([0-9]+)$ product_list.php?path=$1,$2&p=$3 RewriteRule ^c_([a-zA-Z0-9-]+)\/([0-9]+)\/$ product_list.php?path=$1&p=$2 RewriteRule ^c_([a-zA-Z0-9-]+)\/([0-9]+)$ product_list.php?path=$1&p=$2 RewriteRule ^c_([a-zA-Z0-9-]+)\/([a-zA-Z0-9-]+)\/$ product_list.php?path=$1,$2&p=1 RewriteRule ^c_([a-zA-Z0-9-]+)\/([a-zA-Z0-9-]+)$ product_list.php?path=$1,$2&p=1 RewriteRule ^c_([a-zA-Z0-9-]+)\/$ product_list.php?path=$1&p=1 RewriteRule ^c_([a-zA-Z0-9-]+)$ product_list.php?path=$1&p=1 #產品圖片 RewriteRule ^images_([a-zA-Z0-9-_\/\.]+)$ $1