• how to write configuration of wp-super-cache’s htaccess rules/configuration into “virtualhost” section of main configuration that is usually in /etc/… ?

    i have just now asked this about main wordpress htacces that is for permalinks: https://www.ads-software.com/support/topic/how-to-write-configuration-of-htaccess-to-virtual-host-section-in-main-config?replies=1 :

    how to write configuration of htaccess to “virtual host” section in main config?
    i have tried once, but could not make it working, take in account that rules should change.

    why it is good to do so: apache would not search where .htaccess files exist and would not check whether it is changed, so it would work faster, take in account that searching file is relatively long and it checks subdirectories in path to file for .htaccess files.

    same words are for wp-super-cache’s htaccess files. and more needed because wp-super-cache is for cases when server is highly loaded and htaccess works of every request join and make important difference of performance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Look up the Apache documentation. There are plenty of examples showing how. You basically have to paste the same rules in, but surrounded with a Directory directive I think.

    Thread Starter Dinar Qurbanov

    (@qdinar)

    and i know now a tip: RewriteEngine On should be inside of 2 directory tags ie inside directory section.
    i have moved multisite wordpress rules into vhost config 1 week ago.
    i have moved just now also wp-super-cache htaccess rules into vhost config, i have tested just now, it works ( except known bug cases… ) :

    <VirtualHost *:80>
    	ServerName wp.localhost
    	ServerAlias *.wp.localhost
    	ServerAlias ..............
    	DocumentRoot /var/www/localhost/test/wpmu/
    
    	ErrorLog ...
    	LogLevel ...
    	CustomLog ...
    
    	SuexecUserGroup ...
    	Options +ExecCGI
    	AddHandler fcgid-script .php
    	FCGIWrapper ... .php
    
    	<directory /var/www/localhost/test/wpmu/ >
    		RewriteEngine On
    		AllowOverride None
    
    		# BEGIN WPSuperCache
    		<IfModule mod_rewrite.c>
    		AddDefaultCharset UTF-8
    		...
    		RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html" [L]
    		</IfModule>
    		# END WPSuperCache
    
    		# BEGIN WordPress
    		RewriteRule ^index\.php$ - [L]
    		...
    		RewriteRule . index.php [L]
    		# END WordPress
    	</directory>
    
    	<directory /var/www/localhost/test/wpmu/wp-content/cache/ >
    		RewriteEngine On
    		AllowOverride None
    
    		# BEGIN supercache
    		<IfModule mod_mime.c>
    		...
    		</IfModule>
    
    		# END supercache
    
    	</directory>
    
    </VirtualHost>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WP Super Cache] how to write configuration of htaccess to "virtualhost" section o’ is closed to new replies.