Jump to content
davo

www. rewrite

Recommended Posts

Hi,

I have a site running PW 2.8. I moved it to a new server and (possibly foolishly) did the 2.8 upgrade at the same time.

 

Now, all the pages are no longer using the www prefix which has screwed with search engine indexing somewhat. I don't know if it's the way the host file was created on the server or because i have over written the htaccess file.

 

I though that on the .htaccess file I could uncomment the following two lines to prepend www but when i do this i'm getting a 500 error:

  # -----------------------------------------------------------------------------------------------
  # 13. OPTIONAL: Redirect users to the 'www.' version of the site (uncomment to enable).
  # For example: http://processwire.com/ would be redirected to http://www.processwire.com/
  # -----------------------------------------------------------------------------------------------

  # RewriteCond %{HTTP_HOST} !^www\. [NC]
  # RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

 

Any advice please?

 

 

Davo

Share this post


Link to post
Share on other sites

Hi,

In your /site/config.php do you have $config->httpHosts = array('yourdomain.com', 'www.yourdomain.com'); ?

Share this post


Link to post
Share on other sites

I do indeed. I've sorted it now though. I adjusted the preferred domain in plesk. I don't think the server can have  mod rewrite installed

Share this post


Link to post
Share on other sites
10 hours ago, davo said:

I don't think the server can have  mod rewrite installed

If that were so PW wouldn't work full stop.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...