0

I am new to working on a windows server and have been made aware that it is setup for ISPAI Rewrite.

I have tried creating a httpd.ini file and a .conf file with possible redirects but nothing is working.

Could someone show me how to create the correct file and then rewrite the following:

http://aspectexhibitions.co.uk/

Should redirect to:

http://www.aspectexhibitions.co.uk/

--

http://www.aspectexhibitions.co.uk/index.php http://aspectexhibitions.co.uk/index.php

Should redirect to:

http://www.aspectexhibitions.co.uk/

Lance Roberts
  • 22,383
  • 32
  • 112
  • 130
Richard Bland
  • 73
  • 1
  • 3
  • 12

1 Answers1

0

Done...

[ISAPI_Rewrite]

#Redirect Non WWW to WWW
RewriteEngine on

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

#Redirect index.php to root
RewriteEngine on
RewriteBase /

RewriteRule ^index\.php$ http://www.aspectexhibitions.co.uk/ [NC,R=301,L]
Richard Bland
  • 73
  • 1
  • 3
  • 12