0

我对 .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

请有人帮我解决这个问题。

谢谢,
星期六

4

1 回答 1

0

尝试将相对 URI 基础添加到页面标题:

<base href="/">
于 2013-06-27T07:06:41.877 回答