我有一个问题.htaccess有人帮助我。这里是我在.htaccees文件中使用的以下编码。
RewriteEngine On
RewriteCond %{REQUEST_URI} (.*)/(.*)/(.*)/(.*)/(.*)/(.*)/
RewriteRule (.*)/(.*)/(.*)/(.*)/(.*)/(.*)/ /sandbox/all_deals.php?city_id=$1&city_name=$2&cat_id=$3&cat_name=$4&deal_shop_id=$5&deal_shop_name=$6 [L]
RewriteCond %{REQUEST_URI} (.*)/(.*)/(.*)/(.*)/
RewriteRule (.*)/(.*)/(.*)/(.*)/ /sandbox/all_deals.php?city_id=$1&city_name=$2&cat_id=$3&cat_name=$4
RewriteCond %{REQUEST_URI} (.*)/(.*)/
RewriteRule (.*)/(.*)/ /sandbox/all_deals.php?city_id=$1&city_name=$2
当我使用上面的编码图像时,背景图像没有显示
我的域名网址如www.domain.com/sandbox
我希望重写网址如下方法。
1) www.domain.com/sandbox/city-name/shop-name/cat-name/
2) www.domain.com/sandbox/city-name/shop-name/
3) www.domain.com/sandbox/city-name
我需要以上所有条件才能奏效。
我将id值设为
<?php $deal_shop_id= $_GET['deal_shop_id'];
$cat_id = $_GET['cat_id'];
$city_id = $_GET['city_id'];
?>
我的文件夹结构是
/sandbox
/sandbox/images/
/sandbox/all_deals.php
/sandbox/css/style.css
请有人帮我解决这个问题。
谢谢,
饱和
答案 0 :(得分:0)
尝试在页面标题中添加相对URI基础:
<base href="/">