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
WordPress重写库url_Wordpress_.htaccess_Url Rewriting - Fatal编程技术网

WordPress重写库url

WordPress重写库url,wordpress,.htaccess,url-rewriting,Wordpress,.htaccess,Url Rewriting,我正在写一个带有分页的Wordpress图库,现在有如下URL: 我想要: 其中: value - post name photo - static not change 我尝试了permalink设置,但没有解决我的问题,我想我需要重写角色htaccess 将这些添加到文档根目录中的任何wordpress规则之上: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-

我正在写一个带有分页的Wordpress图库,现在有如下URL:

我想要:

其中:

value - post name 
photo - static not change 

我尝试了permalink设置,但没有解决我的问题,我想我需要重写角色htaccess

将这些添加到文档根目录中的任何wordpress规则之上:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^photo/([^/]+)/([^/]+)/([0-9]+)/?$ /photo/$1/?$2=$3 [L,QSA]