Author
Message
James
Posts:1757
Moderator
Member since: 2006-11-29
:: Quote ::
Subject: .htaccess confusion
Yep - it's my age sad smiley

I gather that having a 301 redirect is a good idea. EG, visitor arrives at mysite.com they get directed to [www.mysite.com] to avoid having two sets of pages in Google - hopefully to improve page rank.

I get the idea behind it, but what I don't get is how to implement this on a windows server. The code I've managed to find by googling is:-

RewriteEngine On
rewritecond %{http_host} ^mysite.com
rewriteRule ^(.*) [www.mysite.com] [R=301,L]

Ok - fair enough. I can save and upload this to the root no problems, but I read somewhere that this applies to apache servers. Anyone able to help out with what this old duffer needs to do to get this redirect working for windows servers?

Many thanks!
February 10, 2008 10:58PM
ElvisFan
Posts:308
Preferred member
Member since: 2007-01-10
:: Quote ::
Subject: Re: .htaccess confusion
I had my host server to implement this at their end and it seemed to work...
February 11, 2008 02:28AM
wrench
Posts:210
Preferred member
Member since: 2007-01-15
:: Quote ::
Subject: Re: .htaccess confusion
Sorry, cannot help with the windows servers config, all my sites are on Apache. If you are going to do it, on all my sites I also redirect the index page of the root & all subdirectories to the root of the site, or it's respective directory. All my internal linking is done to the root of directories, not to index files. This section of redirects in my .htaccess is like:

RewriteEngine on
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.(html|php)\ HTTP/
RewriteRule ^(([^/]+/)*)index\.(html|php)$ [www.example.com] [R=301,L]
RewriteCond %{HTTP_HOST} ^example\.com
RewriteRule (.*) [www.example.com] [R=301,L]

But I have no Idea how to impliment this in a Windows server enviroment.

Later, Wrench
February 11, 2008 05:51AM
James
Posts:1757
Moderator
Member since: 2006-11-29
:: Quote ::
Subject: Re: .htaccess confusion
Thanks for the help and info guys. I have emailed the support at the webhosting company to ask them. I'm hoping they can do this their end. Problem is that although thy are located in the middle of the US, they have outsourced their support to Mars, and English doesn't even come close to being the support staff's second language sad smiley Hence asking on here first.
February 11, 2008 07:51AM
James
Posts:1757
Moderator
Member since: 2006-11-29
:: Quote ::
Subject: Re: .htaccess confusion
Well, I contacted my web host and their answer was for me to purchase a licence for the isapi_rewrite module, then I'd have special controls and could do what I want. I'm questioning if it's worth it. OK, the licence is only $99, and it's entirely possible I could make that up from an improvement in adsense, or simply swallow the expense.

At the moment both versions of my index page have PR5. Would having a permanent redirect on one version of the page improve the other's PR? I know that improved PR would possibly mean an improvement in traffic from Google search, which is where most of my traffic comes from, so there may be a benefit to doing this. I'm just not sure, and would welcome opinions.

The other concern is that my webhost, despite claiming to be in the top 10 of US hosters doesn't usually understand support questions as the support is outsourced to mars. It took 2 go's at getting them to understand the question!

There is another possibility in that I could move it to hosting on a non-windows server. Trouble is that I have a section that uses .asp and converting that would be possible, but a nightmare. I'm also concerned that my main index page has the extension .asp, and although there are no .asp elements there any longer, changing it to .htm might mean that the PR it has would dissapear as it's effectively a new page and all the outside links there are to it will have dissapeared along with the .asp version of the page. Indeed, changing any pages that have been indexed, and indexed well is a concern.

My gut feeling is to either keep things running as they are without any redirects, or get the module licence. I think the options of moving pages or hosts would be shooting myself in the foot. What do others thing?
February 15, 2008 08:01AM
DamonHD
Posts:6158
Moderator
Member since: 2006-11-30
:: Quote ::
Subject: Re: .htaccess confusion
I believe that there is a free adaptor that allows you to run .asp files on a non-Windows Apache server.

Rgds

Damon
February 15, 2008 09:10AM

Sorry, you do not have permission to post/reply in this forum.