Mon site Web est un site Web WordPress et je souhaite le réorganiser
Le lien fixe passe de http://nom de domaine/%post_id%.html à http://nom de domaine/%category%//%post_id%.html
Que dois-je faire avec cela ? Qu'en est-il de l'écriture de règles de redirection 301 pour les fichiers .htaccess ?
Voici les fichiers htaccess actuels :
# BEGIN WPSuperCache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#Si vous servez des pages derrière un proxy, vous souhaiterez peut-être modifier 'RewriteCond %{HTTPS} passe à quelque chose de plus sensé
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} sur
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: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} surRewriteCond % {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># FIN WPSuperCache
# COMMENCER 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
# BEGIN EWWWIO
# END EWWWIO
pensezphp
Il est recommandé d'utiliser le saut 301 de PHP