adding www. redirect not working?
-
Before when anyone entered ecigsavings.com into their browser it would redirect them to http://www.ecigsavings.com. I never had to add any redirects in my .htaccess for it to do this as it seemed to do this automatically with the WordPress address (URL) option in settings which is currently set to http://www.ecigsavings.com but its not directing. Maybe somehting in my htaccess is conflicting with it? I copied and pasted it below.
# BEGIN W3 Total Cache <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_URI} \/$ RewriteCond %{REQUEST_URI} !(\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register).php|wp-.*\.php|index\.php) [OR] RewriteCond %{REQUEST_URI} (wp-comments-popup\.php|wp-links-opml\.php|wp-locations\.php) [NC] RewriteCond %{REQUEST_METHOD} !=POST RewriteCond %{QUERY_STRING} ="" RewriteCond %{HTTP_COOKIE} !(comment_author|wp-postpass|wordpress_\[a-f0-9\]\+|wordpress_logged_in) [NC] RewriteCond %{HTTP_USER_AGENT} !(bot|ia_archive|slurp|crawl|spider) [NC] RewriteCond /home/content/33/3864233/html/ecigsavings/wp-content/w3tc/pgcache/$1/_default_.html%{ENV:APPEND_EXT} -f RewriteRule (.*) wp-content/w3tc/pgcache/$1/_default_.html%{ENV:APPEND_EXT} [L] </IfModule> # END W3 Total Cache # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress # 1 YEAR <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$"> Header set Cache-Control "max-age=29030400, public" </FilesMatch> # 1 WEEK <FilesMatch "\.(jpg|jpeg|png|gif|swf|JPG)$"> Header set Cache-Control "max-age=604800, public" </FilesMatch> # 3 HOUR <FilesMatch "\.(txt|xml|js|css)$"> Header set Cache-Control "max-age=10800" </FilesMatch> # NEVER CACHE <FilesMatch "\.(html|htm|php|cgi|pl)$"> Header set Cache-Control "max-age=0, private, no-store, no-cache, must-revalidate" </FilesMatch> # BEGIN Define Mime Types (in case /etc/mime.types is poorly configured or incorrect) <IfModule mod_mime.c> AddType application/x-javascript .js AddType application/x-shockwave-flash .swf AddType image/bmp .bmp AddType image/gif .gif AddType image/pjpeg .pjpeg AddType image/jpeg .jpeg AddType image/jpg .jpg AddType image/png .png AddType image/svg+xml .svg AddType image/tif .tif AddType image/tiff .tiff AddType image/x-icon .ico AddType text/css .css AddType text/htm .htm AddType text/html .html AddType text/plain .txt AddType text/xml .xml AddType text/xsd .xsd AddType text/xsl .xsl </IfModule> # END Define Mime Types <FilesMatch "\.(bmp|css|ico|html?|js|tiff?|gif|p?jpe?g|png|svgz?|swf|txt|xsd|xsl|xml|JPG)$"> <IfModule mod_headers.c> # Set Pragma header Header set Pragma "public" # Set Cache-Control header Header append Cache-Control "public, must-revalidate, proxy-revalidate" </IfModule> # Set Entity Tag header FileETag MTime Size </FilesMatch> # END Headers: Ensure client-side caching of objects # BEGIN Do not allow WordPress to process static objects RewriteCond %{REQUEST_FILENAME} !^.*\.bmp [NC] RewriteCond %{REQUEST_FILENAME} !^.*\.css [NC] RewriteCond %{REQUEST_FILENAME} !^.*\.gif [NC] RewriteCond %{REQUEST_FILENAME} !^.*\.html? [NC] RewriteCond %{REQUEST_FILENAME} !^.*\.js [NC] RewriteCond %{REQUEST_FILENAME} !^.*\.p?jpe?g [NC] RewriteCond %{REQUEST_FILENAME} !^.*\.png [NC] RewriteCond %{REQUEST_FILENAME} !^.*\.svgz? [NC] RewriteCond %{REQUEST_FILENAME} !^.*\.swf [NC] RewriteCond %{REQUEST_FILENAME} !^.*\.tiff? [NC] RewriteCond %{REQUEST_FILENAME} !^.*\.txt [NC] RewriteCond %{REQUEST_FILENAME} !^.*\.xsd [NC] RewriteCond %{REQUEST_FILENAME} !^.*\.xsl [NC] RewriteCond %{REQUEST_FILENAME} !^.*\.xml [NC] # END Do not allow WordPress to process static objectsas a side note I have to disable the htaccess to get tinymce to work cause the pop ups come up blank. If anyone sees whats causing this in my htaccess please let me know. Noone has ever been able to resolve it.
thanks
The topic ‘adding www. redirect not working?’ is closed to new replies.