[wp-hackers] Putting mod_rewrite rules in httpd.conf

Paul Menard codehooligans at codehooligans.com
Mon Sep 4 22:51:50 GMT 2006

Yeah sorry. The line 'AllowOverride Al' was the original line.  
Agreed. Now that I moved the rewrite rules to the httpd.conf I no  
longer need this and can allow the global setting to apply.

As for the change in the Permalinks I mentioned. What I meant was the  
warning or error or whatever it is if you attempt to update the rules  
and you do not have an .htaccess file. You get the message something  
like 'Please update your .htaccess file.' I'm sure I've mis-quoted so  
no flaming please. Anyway it's not an error and correct the rewrite  
rules in the httpd.conf don't need to change.


On Sep 4, 2006, at 4:01 PM, Alan J Castonguay wrote:

> Paul Menard wrote:
>> I've tried and and it works. For the sake of example here is my  
>> actual Virtual Host entry. This is a local copy of WordPress  
>> pulled from Subversion this weekend. Fresh install.
>> During the setup I went through my normal configuration via  
>> Options -> Permalinks. Once I have generated the .htaccess file I  
>> copied the contented into my httpd.conf and then removed  
>> the .htaccess file.
>> I'm not sure what happend to the Options -> Permalinks coding if  
>> you later attempt to update the .htaccess file.
>> <VirtualHost>
>>     ServerName dev.wpsvn.com
>>     ServerAdmin webmaster
>>     DocumentRoot     /usr/local/htdocs/dev/dev.wpsvn.com
>>     ErrorLog         /private/var/log/httpd/dev/dev.wpsvn.com/ 
>> error_log
>>     CustomLog         /private/var/log/httpd/dev/dev.wpsvn.com/ 
>> access_log common
>>     <Directory         /usr/local/htdocs/dev/dev.wpsvn.com>
>>         AllowOverride All
>>         # BEGIN WordPress
>>         <IfModule mod_rewrite.c>
>>             RewriteEngine On
>>             RewriteBase /wordpress/
>>             RewriteCond %{REQUEST_FILENAME} !-f
>>             RewriteCond %{REQUEST_FILENAME} !-d
>>             RewriteRule . /wordpress/index.php [L]
>>         </IfModule>
>>         # END WordPress
>>     </Directory>
>> </VirtualHost>
> I take it you've moved .htaccess out of the way? If so, the above  
> should work fine. However, you're not going to get any performance  
> improvement unless you also set "AllowOverride None", like Brian  
> said. The whole point of moving the rewrite rules into your  
> httpd.conf is to /not/ go checking the drive for .htaccess files.
> The .htaccess file doesn't need to be updated when permalinks  
> change. (It used to in a former version of wordpress, which  
> resulted in huge lists of rules.)
> Alan J Castonguay
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list