web-dev-qa-db-fra.com

Changer le contenu de wp sans changer le nom du dossier

Cela ne fonctionne pas

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteRule ^/index\.php$ - [L]
RewriteRule ^/css/(.*) /wp-content/themes/themename/css/$1 [QSA,L]
RewriteRule ^/js/(.*) /wp-content/themes/themename/js/$1 [QSA,L]
RewriteRule ^/img/(.*) /wp-content/themes/themename/img/$1 [QSA,L]
RewriteRule ^/font/(.*) /wp-content/themes/themename/font/$1 [QSA,L]
RewriteRule ^/plugins/(.*) /wp-content/plugins/$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
1
Moustafa

Supprimez les règles qui précèdent de vos règles:

Exemple (incorrect)

RewriteRule ^/css/(.*) /wp-content/themes/themename/css/$1 [QSA,L]

Exemple (correct)

RewriteRule ^css/(.*) wp-content/themes/themename/css/$1 [QSA,L]

Toutes les règles (correctes)

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteRule ^/index\.php$ - [L]
RewriteRule ^css/(.*) wp-content/themes/themename/css/$1 [QSA,L]
RewriteRule ^js/(.*) wp-content/themes/themename/js/$1 [QSA,L]
RewriteRule ^img/(.*) wp-content/themes/themename/img/$1 [QSA,L]
RewriteRule ^font/(.*) wp-content/themes/themename/font/$1 [QSA,L]
RewriteRule ^plugins/(.*) wp-content/plugins/$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
0
userabuser