Activating the Apache module breaks my site – need advice on how to configure
-
Hi.
I have up to know been using the Redirection WordPress module, and I have had no issue with that. Since the number of redirects has increasing over the years, I want to use start using the Apache module to get better performance.
When I configure the Apache module, by inputting the location to my sites .htaccess file – my site breaks.
The content of my .htaccess file before I configure Redirection Apache module is shown bellow;
### BEGIN .htaccess # Protect the htaccess file <Files .htaccess> Order Allow,Deny Deny from all </Files> # Protect wpconfig.php <Files wp-config.php> Order Allow,Deny Deny from all </Files> # Disable directory browsing # Options All -Indexes # BEGIN COMPRESSION AND CACHING <IfModule mod_deflate.c> # Enable compression AddOutputFilterByType DEFLATE text/css text/javascript application/x-javascript text/html text/plain text/xml image/x-icon application/javascript <IfModule mod_setenvif.c> BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html </IfModule> <IfModule mod_headers.c> # Make sure proxies deliver correct content Header append Vary User-Agent env=!dont-vary # Ensure proxies deliver compressed content correctly Header append Vary Accept-Encoding </IfModule> </IfModule> <IfModule mod_headers.c> # No ETags, No Pragma Header unset Pragma Header unset ETag # Default cache time to 1 year (31536000 sec) Header set Cache-Control "max-age=31536000, public, must-revalidate" </IfModule> # No ETags FileETag none # CACHE SETTINGS (mod_expires) <IfModule mod_expires.c> # Turn on Expires ExpiresActive On # set default to "access plus 1 year" ExpiresDefault A31536000 # html - "modification plus 1 hour" ExpiresByType text/html M3600 # css and JavaScript - "modification plus 6 weeks" ExpiresByType text/css M3628800 ExpiresByType text/javascript M3628800 ExpiresByType application/x-javascript M3628800 </IfModule> # No cache for php-files <FilesMatch "\.(php)$"> <IfModule mod_expires.c> ExpiresActive Off </IfModule> <IfModule mod_headers.c> Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform" </IfModule> </FilesMatch> # END CACHING # W3 Total Cache are here (automatically included by the plugin): # WordPress Default Rules are here (at the end of the file): # BEGIN W3TC Page Cache core <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_METHOD} !=POST RewriteCond %{QUERY_STRING} ="" RewriteCond %{REQUEST_URI} \/$ RewriteCond %{HTTP_COOKIE} !(comment_author|wp-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC] RewriteCond "%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index.html" -f RewriteRule .* "/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index.html" [L] </IfModule> # END W3TC Page Cache core # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] RewriteCond %{HTTP_HOST} !^www\.stillingen\.com RewriteRule (.*) https://www.stillingen.com/$1 [R=301,L] </IfModule> # END WordPress ### END .htaccess
When configuring Redirection Apache module, this code is added;
# Created by Redirection Module: Apache4 # Sun, 06 Oct 2013 10:29:45 +0000 # Redirection 2.3.4 - https://urbangiraffe.com/plugins/redirection/ <Files .htaccess,.svn> order allow,deny deny from all </Files> Options +FollowSymlinks <IfModule mod_rewrite.c> </IfModule> # End of Redirection
It is Options +FollowSymlinks that breaks my site, and Redirection write this to my .htaccess file every time i configure something in Redirection.
I have also tried starting of with a black .htaccess, with also results in the site being broken.
Any advice is highly appreciated.
- The topic ‘Activating the Apache module breaks my site – need advice on how to configure’ is closed to new replies.