【发布时间】:2018-06-25 00:11:58
【问题描述】:
我正在尝试重写这种网址:
http://www.xyz.pl/program-tv/?polsat
到这个网址:
http://www.xyz.pl/program-tv/polsat
我在 .htaccess 中创建了一些代码,将我的旧网址重写为所需的网址。但它会生成:
404 Not found error
这是我到目前为止所拥有的,你有什么提示我做错了什么吗?是 WordPress 还是我的代码的错?
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} ^(.+)$
RewriteRule ^(.*)$ $1%1? [R=301,L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
【问题讨论】:
标签: wordpress .htaccess mod-rewrite url-rewriting