Hi Guys n Girls,

I hope this is in the right place. I have recently uploaded my html website and have run some SEO tools telling me that there is no 301 redirect present.

I have a www. version and a none www. version of the site. Google has found the none www version. I use some front page forms so my site is hosted with a company running windows server 2003 and front page server extensions present.

I called them and asked them to put the 301 redirect in place server side using IIS 6.0 (Which is installed) After a weekend of being fobbed off by their support I gather that it is not their company procedure to touch anything in ISS on a shared server and that they will not do it for love nor money.

Apache is installed on teh windows server so I wanted to try the .htaccess method but they have said that on their server this has very limited function and will not work. They also said this .htaccess will not even run some simple PHP scripting.

I also gather that you should NEVER do a 301 redirect using javascript (which was about my best option as I have a basic knowledge) and also NEVER do a meta refresh.

This leaves me with few options. My pages are all .htm extension so by using PHP scripts they would have a .php extension if the server allows PHP scripts to run (Im have no idea) or asp script would become .asp extension etc etc.

I do not know any php, or asp or asp.net however when I checked the header return (whilst trying various above mentioned scripts) i found that asp.net was mentioned so presume the server supports this.

I was always into hardware and networking so I only did minimal programming and webdesign.

Please help what can I do and how can I do it?

Sorry Me again! I just read my own post and can hardly understand it.

I would like to know if I do something like index.php to index.htm and include the 301 redirect script as follows:

if (substr(getenv('HTTP_HOST'),0,3) != 'www')
  header('HTTP/1.1 301 Moved Permanently');

In the php file to redirect mysite.com to www.mysite.com how do I get my site to pick up the php not the htm file. Also I googled this script so not have a clue what it means.

I have no access to .htaccess file although I think there is one there as I have frontpage server extensions installed and its on a windows 2003 server with apache. Even if I had access I am not sure I can use PHP in there. I do not know what script to use and worse even if I did I do not know how to use it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.