| Webmaster Forum Rules | Posting Guide | Contact Us | Testimonials | Contributing Geek Program | Advertise on Geek/Talk |
|
|
|||||||
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Registered User
Join Date: Oct 2001
Location: Winnipeg, Manitoba
Posts: 210
|
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? |
|
|
|
|
|
#2 |
![]() Join Date: May 2001
Location: Beautiful Darwin
Posts: 4,752
|
This might be better placed in Webmaster Issues
*moved*
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Feb 2011
Posts: 13
|
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 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
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 09: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 06:26 AM |
| Free Redirect Service For Long Domain Names | Steve_S | Web Design and Webmaster Issues | 12 | 04-23-2000 11:27 PM |
![]()