Meine Website ist eine WordPress-Website und ich möchte sie überarbeiten
Der feste Link springt von http://domain name/%post_id%.html zu http://domain name/%category%//%post_id%.html
Was soll ich damit machen? Wie wäre es mit dem Schreiben von 301-Umleitungsregeln für .htaccess-Dateien?
Hier sind die aktuellen htaccess-Dateien:
# BEGIN WPSuperCache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#Wenn Sie Seiten hinter einem Proxy bereitstellen, möchten Sie möglicherweise „RewriteCond“ ändern %{HTTPS} weiter zu etwas Vernünftigerem
AddDefaultCharset UTF-8
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^. *(comment_author_|wordpress_logged_in|wp-postpass_).*$
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9"]+ [NC]
RewriteCond %{HTTP:Profile} ! ^[a-z0-9"]+ [NC]
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{HTTPS} on
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/% {SERVER_NAME}/$1/index-https.html.gz -f
RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz" [L ). $
RewriteCond %{HTTP:X-Wap-Profile}!^[a-z0-9"]+ [NC ]
RewriteCond %{HTTP:Accept-Encoding} gzipRewriteCond %{HTTPS} !onRewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html .gz -fRewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz" [L]RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
RewriteCond %{HTTP:X-Wap-Profile } ! ^[a-z0-9"]+ [NC]
RewriteCond %{HTTP:Profile} !^[a-z0-9"]+ [NC]
RewriteCond %{HTTPS} onRewriteCond % {DOCUMENT_ROOT }/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html -fRewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1 /index -https.html" [L]RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_ |wordpress_logged_in |wp-postpass_).*$
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9"]+ [NC]
RewriteCond %{HTTP:Profile} !^[a -z0 -9"]+ [NC]
RewriteCond %{HTTPS} !onRewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html -fRewriteRule ^( .*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html" [L]</IfModule># END WPSuperCache
# BEGIN WordPress <IfModule mod_rewrite.c>
RewriteEngine OnRewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# ENDE WordPress
# BEGIN EWWWIO
# ENDE EWWWIO
thinkphp
建议使用php的301跳转