Wordpress重写我的Html页面

时间:2015-04-24 16:55:10

标签: wordpress rewrite

我有一个基于wordpress的网站,我想添加一个HTML页面。 问题是Permalink Wordpress系统将我的www.website.com/page.html解释为文章并给出了404错误。 该怎么办 ? 我的页面是www.website.com/page.html(我只有一个简单的文字)。

我尝试过:



RewriteRule test.html test.php [L]




进入我的.htaccess文件但没有解决方案。

我的htaccess



#php_flag display_errors on
#php_value error_reporting 7

<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /website
RewriteRule ^page-([^.]+)\.html$ article.php?art=$1 [L]
RewriteCond %{QUERY_STRING} ^(.*)
RewriteRule ^portofoliu-([^.]+)\.html(.*)$ category.php?key=$1&q=%1 [L]
RewriteCond %{REQUEST_URI} !^googled8f5c3c57ae1538c\.html$
RewriteRule ^([^.]+)\.html$ article.php?key=$1 [L]

# all non www go to www
RewriteCond %{HTTP_HOST} !^www.website.ro
RewriteRule (.*) http://www.website.ro/$1 [R=301,L]
</IfModule>

<filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
#Header set Expires "11/02/2012 20:00:00"
</filesMatch>

#<IfModule mod_charset_lite.c>
#AddDefaultCharset ISO-8859-1
#AddDefaultCharset UTF-8
#</IfModule>

<ifmodule mod_deflate.c>
# Insert filter
SetOutputFilter DEFLATE
# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Don't compress images
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</ifmodule>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
&#13;
&#13;
&#13;

0 个答案:

没有答案