Webmaster Forum Rules | Posting Guide | Contact Us | Testimonials | Contributing Geek Program | Advertise on Geek/Talk
Welcome to the GeekTalk Webmaster Discussion Forums from GeekVillage.com

Click Here To Register. It's Free!

Go Back   geek/talk: Signature-free discourse for serious web publishers > YOUR CREATION: Building & Maintaining A Web Site > Web Design and Webmaster Issues
User Name
Register FAQ Calendar Search Today's Posts Mark Forums Read

Thread Tools Display Modes
Old 03-22-2006, 11:37 AM   #1
Registered User
Join Date: Oct 2001
Location: Winnipeg, Manitoba
Posts: 210
Default 301 redirect help

One of our sites got hit in google and has gone supplemental. I'm trying to ensure that pages are accessed only thru mydomain.com rather than www.mydomain.com using .htaccess using the following code.

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST** ^www.mydomain.com [NC]
RewriteRule ^(.*)$ http://mydomain.com/$1 [L,R=301]

This seems to work for all pages EXCEPT those involving a perl script in cgi-bin which isn't redirecting. The htaccess file is in httpdocs, while the cgi-bin directory is in root (however I can't create an .htaccess file in root (no permissions to do so).

Is there something obvious I am missing to get this to work?

PS. As for google, oddly enough we have about eight domains, with one attempting this kind of redirect. The ONLY site that got hit in the SERPS was the one with the redirect (which is the opposite of what I expected due to possible dupe content issues). Anyone got any comments on this?
rbacal is offline   Reply With Quote
Old 03-29-2006, 06:58 AM   #2

Join Date: May 2001
Location: Beautiful Darwin
Posts: 4,753

This might be better placed in Webmaster Issues *moved*
Jan is offline   Reply With Quote
Old 04-10-2011, 11:41 AM   #3
Registered User
Join Date: Feb 2011
Posts: 12

When you create a .htaccess file make sure you transfer it in ASCII and not binary. You will probably want to CHMOD the file to 644 for security reasons as well. .htaccess is an
Apache technology and not a windows server technology
nitpat1 is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I edit [my] htaccess for for a 301 redirect sprouter Web Design and Webmaster Issues 4 02-27-2006 10:49 PM
Very Frustrating and Strange Problem with a 301 Redirect - please help I'm desperate! Andy_S_G Search Engine Marketing & Optimization 4 07-31-2005 11:14 PM
Redirect 301 questions river Search Engine Marketing & Optimization 3 05-10-2005 03:01 PM
Yahoo Website Services (formerly Simplenet) refuses to redirect my old URL demae Web Hosting Discussion 2 02-13-2001 07:26 AM
Free Redirect Service For Long Domain Names Steve_S Web Design and Webmaster Issues 12 04-23-2000 11:27 PM

Please support our advertisers. They ensure our survival.

All times are GMT -5. The time now is 12:37 PM.

GeekVillage.com is copyright © 1998-2015 Curiosity Cave - Science gifts for clever kids. All rights reserved.
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.