WordPress-Permalinks direkt in httpd.conf festlegen?

WordPress-Permalinks direkt in httpd.conf festlegen?

Ist es möglich, WordPress-Permalinks direkt in Apache httpd.conf zu konfigurieren?

Ich habe eine Serversituation (Apache 2.2.3 CentOS PHP5.1.6), in der ich aus Leistungsgründen .htaccess nicht verwenden kann, aber httpd.conf.

Der Administrator sagt, dass mod_rewrite aktiviert ist, AllowOverride jedoch nicht, und ich kann diese Einstellungen nicht ändern.

Und ich muss die Permalinks auf das Verzeichnis „Blog“ beschränken.

Dies würde in .htaccess gehören, muss aber in httpd.conf:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>

Danke...

Antwort1

Fügen Sie dies in den Container für Ihre Site ein.

<Directory /path/to/blog/>
  <IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /blog/
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /blog/index.php [L]
  </IfModule>
</Directory>

verwandte Informationen