Set WordPress permalinks directly in httpd.conf?

Posted by songdogtech on Server Fault See other posts from Server Fault or by songdogtech
Published on 2010-06-07T16:44:10Z Indexed on 2010/06/07 16:53 UTC
Read the original article Hit count: 321

Is is possible to configure WordPress permalinks directly in Apache httpd.conf?

I have a server situation (Apache 2.2.3 CentOS PHP5.1.6) where I can't use .htaccess for performance reasons, but can use httpd.conf.

The admin says that mod_rewrite is enabled, but AllowOverride is not, and I can't change those settings.

And I need to restrict the permalinks to just the "blog" directory.

This is what would go in .htaccess but needs to go into httpd.conf:

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

Thanks...

© Server Fault or respective owner

Related posts about centos

Related posts about mod-rewrite