Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.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
Mod rewrite MOD_从静态URL重写为动态URL_Mod Rewrite - Fatal编程技术网

Mod rewrite MOD_从静态URL重写为动态URL

Mod rewrite MOD_从静态URL重写为动态URL,mod-rewrite,Mod Rewrite,我有以下正确的URL… 但我需要它来呈现此页面: 这是我当前的.htaccess,它已经正确地服务于其他页面。我想添加一些内容来管理其他规则。我试过用木桶装啤酒 php_flag magic_quotes_gpc off AddDefaultCharset UTF-8 Options -Indexes +FollowSymLinks # # Setting rewrite rules # <IfModule mod_rewrite.c> RewriteEngine On

我有以下正确的URL…

但我需要它来呈现此页面:

这是我当前的.htaccess,它已经正确地服务于其他页面。我想添加一些内容来管理其他规则。我试过用木桶装啤酒

php_flag magic_quotes_gpc off
AddDefaultCharset UTF-8
Options -Indexes +FollowSymLinks

#
# Setting rewrite rules
#

<IfModule mod_rewrite.c>
  RewriteEngine On
  # Set next line to your Wolf CMS root - if not in subdir, then just /
  RewriteBase /

  # Rules to allow install sequence to test for mod_rewrite support
  RewriteRule ^install/index.html$ install/index.php?rewrite=1 [L,QSA]
  RewriteRule ^install/index.php$ install/index.php?rewrite=1 [L,QSA]
  RewriteRule ^install/$ install/index.php?rewrite=1 [L,QSA]

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-l
  # Administration URL rewriting.
  RewriteRule ^admin(.*)$ admin/index.php?$1 [L,QSA]

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-l
  # Main URL rewriting.
  RewriteRule ^(.*)$ index.php?WOLFPAGE=$1 [L,QSA]

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-l  

  RewriteRule ^(.*)$ index.php?cask-beer?$1

</IfModule> 
php\u flag magic\u quotes\u gpc off
AddDefaultCharset UTF-8
选项-索引+FollowSymLinks
#
#设置重写规则
#
重新启动发动机
#将下一行设置为Wolf CMS根目录-如果不在子目录中,则只需/
重写基/
#允许安装序列测试mod_重写支持的规则
重写规则^install/index.html$install/index.php?重写=1[L,QSA]
重写规则^install/index.php$install/index.php?重写=1[L,QSA]
重写规则^install/$install/index.php?重写=1[L,QSA]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写cond%{REQUEST_FILENAME}-L
#管理URL重写。
重写规则^admin(.*)$admin/index.php?$1[L,QSA]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写cond%{REQUEST_FILENAME}-L
#主URL重写。
重写规则^(.*)$index.php?WOLFPAGE=$1[L,QSA]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写cond%{REQUEST_FILENAME}-L
重写规则^(.*)$index.php?桶装啤酒?$1
任何帮助都将不胜感激。
干杯

只需将此规则添加到其他规则的顶部即可:

RewriteRule ^cask-beer/wells-and-youngs$ cask-beer?catID=4 [L,QSA]

只需将此规则添加到其他规则的顶部:

RewriteRule ^cask-beer/wells-and-youngs$ cask-beer?catID=4 [L,QSA]

你需要一个1比1的规则吗?我的意思是,此规则必须仅对该url有效,否则您需要重写一组url。共有三个类别。。。桶装啤酒、苹果酒、专业啤酒,每种啤酒后面都有产品,例如桶装啤酒/富勒尔。您需要1:1规则吗?我的意思是,此规则必须仅对该url有效,否则您需要重写一组url。共有三个类别。。。桶装啤酒、苹果酒、专业啤酒,每种啤酒后面都有产品,例如桶装啤酒/富勒啤酒