1
刚刚创建了一个基于WordPress的网站,现在我遇到了以下问题。在Wordpress中没有构建的旧网站使用变量p=
作为它的页面,就像Wordpress一样。现在我试图重定向他们,但这不起作用,我想,因为Wordpress也使用p变量。用变量重定向wordpress页面
我想http://purplethinking.nl/mauritshof/?p=brunch
页面重定向到页面http://purplethinking.nl/mauritshof/feestelijk/brunch
我改变了我的.htaccess
并添加以下行:
RewriteRule ^/mauritshof/?p=brunch$ /feestelijk/brunch/[L]
您能告诉我在做什么错?
编辑:这是我的完整的.htaccess文件
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /mauritshof/
RewriteCond %{QUERY_STRING} ^p=([^&]+)
RewriteRule ^mauritshof/?$ /feestelijk/brunch/ [L,R]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /mauritshof/index.php [L]
</IfModule>
# END WordPress
感谢您的快速回复!我将这些规则添加到我的.htaccess中,但仍然没有运气。 – PieterB
你可以在你的问题中粘贴你的完整.htaccess。 – anubhava
我已添加我的.htaccess文件 – PieterB