By cea


2013-02-17 02:38:41 8 Comments

I have my site in sub directory and it works both with and without www prefix but when I place it in maintenance mode I've noticed it doesn't work for the front page without www prefix until you either try log in or go to another linked page.

Is there anyway I can fix it so it works on that front page when no www prefix?

1 comments

@beth 2013-02-17 03:10:57

Add this to your .htaccess file:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

(Per this tutorial)

Related Questions

Sponsored Content

2 Answered Questions

[SOLVED] Pitfalls when updating a site without entering maintenance mode?

1 Answered Questions

[SOLVED] Maintenance mode and user session

  • 2018-06-29 09:02:02
  • Michael
  • 170 View
  • 1 Score
  • 1 Answer
  • Tags:   maintenance-mode

2 Answered Questions

2 Answered Questions

1 Answered Questions

[SOLVED] Site stuck in maintenance mode

  • 2011-03-03 12:12:22
  • kiamlaluno
  • 10046 View
  • 15 Score
  • 1 Answer
  • Tags:   maintenance-mode

2 Answered Questions

1 Answered Questions

URLs with trailing slash say site in maintainence mode, others don't, site isn't in maintenance mode

  • 2016-09-10 13:13:59
  • user56reinstatemonica8
  • 40 View
  • 0 Score
  • 1 Answer
  • Tags:   7 uri maintenance-mode

4 Answered Questions

[SOLVED] What does maintenance mode do?

  • 2015-03-12 03:00:43
  • Allen
  • 2237 View
  • 2 Score
  • 4 Answer
  • Tags:   maintenance-mode

2 Answered Questions

[SOLVED] How to apply css to the maintenance page?

2 Answered Questions

[SOLVED] Theme the login page for Maintenance mode

Sponsored Content