Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.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 htaccess url重写许多链接并保护css和js文件_Php_.htaccess_Url Rewriting_Friendly Url_Seo - Fatal编程技术网

Php htaccess url重写许多链接并保护css和js文件

Php htaccess url重写许多链接并保护css和js文件,php,.htaccess,url-rewriting,friendly-url,seo,Php,.htaccess,Url Rewriting,Friendly Url,Seo,我想重写我的链接,但有多种风格 这是我想要的我想要的样子 Infocms是我的重写基础 猫的风格 帖子风格 页面样式 我的页面是 cats style=>cats.php?name=catname posts style=>posts.php?title=posttitle 页面样式=>page.php?name=catname 注意 当我试图将url重写为posts样式时,css和js文件也有很多问题请参见下面的url 或者试试下面 Options +FollowSymlinks Re

我想重写我的链接,但有多种风格 这是我想要的我想要的样子

Infocms是我的重写基础

猫的风格

帖子风格

页面样式

我的页面是

cats style=>cats.php?name=catname

posts style=>posts.php?title=posttitle

页面样式=>page.php?name=catname

注意

当我试图将url重写为posts样式时,css和js文件也有很多问题

请参见下面的url

或者试试下面

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^files/([^/]+)/([^/]+).zip /download.php?section=$1&file=$2 [NC]
将允许您将此链接显示为

mysite/files/games/hoopy.zip
并在后台将其透明地翻译到服务器端

mysite/download.php?section=games&file=hoopy

到目前为止,您的htaccess文件中有哪些内容?