Diferencia entre revisiones de «Configuraciones para ficheros .htaccess»

De nuxpy
Ir a la navegación Ir a la búsqueda
(Página creada con «= Modelo 1 = <syntaxhighlight lang="apache"> RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ - [L] #…»)
 
Línea 15: Línea 15:
 
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
 
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
 
RewriteRule . index.php [L]
 
RewriteRule . index.php [L]
 +
</syntaxhighlight>
 +
= Model WordPress =
 +
<syntaxhighlight lang="apache">
 +
<IfModule mod_rewrite.c>
 +
    RewriteEngine On
 +
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
 +
    RewriteBase /
 +
    RewriteRule ^index\.php$ - [L]
 +
    RewriteCond %{REQUEST_FILENAME} !-f [OR]
 +
    RewriteCond %{REQUEST_FILENAME} !-d
 +
    RewriteRule . /index.php [L]
 +
</IfModule>
 
</syntaxhighlight>
 
</syntaxhighlight>
 
= Temas relacionados =
 
= Temas relacionados =
  
 
[[Categoría:Wordpress]]
 
[[Categoría:Wordpress]]
 +
[[Categoría:Apache]]

Revisión del 14:00 12 feb 2024

Modelo 1

RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

Model WordPress

<IfModule mod_rewrite.c>
     RewriteEngine On
     RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
     RewriteBase /
     RewriteRule ^index\.php$ - [L]
     RewriteCond %{REQUEST_FILENAME} !-f [OR]
     RewriteCond %{REQUEST_FILENAME} !-d
     RewriteRule . /index.php [L]
</IfModule>

Temas relacionados