Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 友好url无法正常工作_Php_Apache_.htaccess_Smarty_Prestashop - Fatal编程技术网

Php 友好url无法正常工作

Php 友好url无法正常工作,php,apache,.htaccess,smarty,prestashop,Php,Apache,.htaccess,Smarty,Prestashop,我是新手。所以也许我犯了一些愚蠢的错误。但我会尽量详细解释我的问题 因此,我将我的urlmycarshop/en/module/car?name=carBrand设置为我使用的友好urlmycarshop/car/carBrand .htaccess mod_rewrite RewriteRule ^car/([^_]*)\.html$ /en/module/car?name=$1 [L] 但现在我无法设置我的链接来获取carBrand和使用carBrand控制器 OldUrl:mycarsh

我是新手。所以也许我犯了一些愚蠢的错误。但我会尽量详细解释我的问题

因此,我将我的url
mycarshop/en/module/car?name=carBrand
设置为我使用的友好url
mycarshop/car/carBrand

.htaccess mod_rewrite

RewriteRule ^car/([^_]*)\.html$ /en/module/car?name=$1 [L]
但现在我无法设置我的链接来获取carBrand和使用carBrand控制器

OldUrl:
mycarshop/en/module/car?name=MD

语言:lang html

<a> href="{$link->getModuleLink('module','carBrand',['name'=>$car.brand])}" title="{$car.brand|escape:'htmlall':'utf-8'}"</a>
<a> href="{car/$car.brand}" title="{$car.brand|escape:'htmlall':'utf-8'}"</a>

它必须是这样的,并且仍然使用carBrand
carBrand.php
controller。

您将变量与文件夹名称混合在一起。它可能与
href=“car/{$car.brand}”

@anubhava一起使用,您使用的是哪个版本的prestashop?