我想使用category.php
从page.php
重定向到.htaccess
。在我从索引成功重定向到category.php
之后,我将问题重定向到page.php
。
.htaccess
档案:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $ !^(index\.php|images|robots\.txt\css\js)
RewriteRule ^([0-9a-zא-תA-Z_]+) category.php?name=$1 [QSA]
RewriteRule ^([0-9a-zא-תA-Z_]+)/([0-9a-zא-תA-Z_]+)/ page.php?product=$1&categ=$2 [QSA]
HTML代码(category.php
):
<a href="'.str_replace(" ","_",$cval['pages_name_nice']).'/'.str_replace(" ","_",$get_one_pages['pages_name_nice']).'/"><img src="images/item_button.png" width="50" height="50" alt=""></a>