This forum has been moved here:
Helicon Tech Community Forum

ISAPI_Rewrite 3.0 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: Newbie help needed in re-write
Message |

Joined: 29 October 2011
Location: United Kingdom
Posts: 1
Posted: 29 October 2011 at 10:09am

Hi, I understand that I have a ISAPI_Redirect installed on my PLESK II server

I would like to have a 301 re-direct for my website for non www to all go to www

Can anyone please confirm that the following is the correct code to be used? and that it should go in the .htaccess file

RewriteEngine on
RewriteCond %{HTTPS} (on)?
RewriteCond %{HTTP:Host} ^(?!www\.)(.+)$ [NC]
RewriteCond %{REQUEST_URI} (.+)
RewriteRule .? http(?%1s)://www.%2%3 [R=301,L]

I alread have the following code in the .htaccess file... which I believe gets my Wordpress blog to work correctly - can I leave the following code alone? and IF all is correct which code should I place first?

# BEGIN wordpress

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_fileNAME} !-f

RewriteCond %{REQUEST_fileNAME} !-d

RewriteRule . /index.php [L]


# END wordpress

Thanks for help....



Back to Top Visit Gemini23's Homepage

Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 31 October 2011 at 6:19am

We do confirm that this set of rules is correct.
Try using it separately in httpd.conf. In case it still doesn't work, please, provide rewrite.log for the testing request.
Logging issues described in FAQ

Back to Top

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version