SEO Scripts
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   SEO Chat ForumsOtherSEO Scripts

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread SEO Chat Forums Sponsor:
  #1  
Old January 31st, 2008, 05:49 AM
seogoat's Avatar
seogoat seogoat is offline
Contributing User
Click here for more information
 
Join Date: Jan 2008
Posts: 187 seogoat User rank is Corporal (100 - 500 Reputation Level)seogoat User rank is Corporal (100 - 500 Reputation Level)seogoat User rank is Corporal (100 - 500 Reputation Level)seogoat User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 23 h 52 m 35 sec
Reputation Power: 2
Htaccess Redirection Problem

If I try using the bottom part of this script to redirect index.htm to the www domain it doesn't work. But it works if I'm trying to redirect index.html. But if I change the html to htm like I have done below it doesn't work. Is there any way to make minor alterations to make it work?

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(domainwithoutwww)
RewriteRule (.*) (domainwithwww)/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.htm\ HTTP/
RewriteRule ^index\.htm$ (domainwithwww/) [R=301,L]

Please help. Also I can't put the full domain in because the forum won't allow it. Try to make some sense of it.

Reply With Quote
  #2  
Old January 31st, 2008, 06:23 AM
pro_seo's Avatar
pro_seo pro_seo is offline
Moderator
SEO Chat Frequenter (2500 - 2999 posts)
 
Join Date: Apr 2006
Location: I N D I A
Posts: 2,862 pro_seo User rank is Sergeant Major (2000 - 5000 Reputation Level)pro_seo User rank is Sergeant Major (2000 - 5000 Reputation Level)pro_seo User rank is Sergeant Major (2000 - 5000 Reputation Level)pro_seo User rank is Sergeant Major (2000 - 5000 Reputation Level)pro_seo User rank is Sergeant Major (2000 - 5000 Reputation Level)pro_seo User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Month 3 Weeks 3 Days 14 h 56 m 44 sec
Reputation Power: 36
Send a message via AIM to pro_seo Send a message via MSN to pro_seo Send a message via Yahoo to pro_seo Send a message via Google Talk to pro_seo Send a message via Skype to pro_seo
Put this in your htaccess

Quote:
RewriteEngine on
Options +FollowSymlinks

rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,L]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.htm\ HTTP/
RewriteRule ^(.*)index\.htm$ /$1 [R=301,L]


...and let us know if it works for you.
__________________

SEO FAQs - You might find your answer here.
SEOchat Forum Rules - Read Before You Post


**Do what you feel in your heart to be right- for you'll be criticized anyway. You'll be damned if you do, and damned if you don't.**

Reply With Quote
  #3  
Old January 31st, 2008, 06:51 AM
seogoat's Avatar
seogoat seogoat is offline
Contributing User
Click here for more information
 
Join Date: Jan 2008
Posts: 187 seogoat User rank is Corporal (100 - 500 Reputation Level)seogoat User rank is Corporal (100 - 500 Reputation Level)seogoat User rank is Corporal (100 - 500 Reputation Level)seogoat User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 23 h 52 m 35 sec
Reputation Power: 2
Spot on..Thanks..

Reply With Quote
  #4  
Old January 31st, 2008, 06:53 AM
seogoat's Avatar
seogoat seogoat is offline
Contributing User
Click here for more information
 
Join Date: Jan 2008
Posts: 187 seogoat User rank is Corporal (100 - 500 Reputation Level)seogoat User rank is Corporal (100 - 500 Reputation Level)seogoat User rank is Corporal (100 - 500 Reputation Level)seogoat User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 23 h 52 m 35 sec
Reputation Power: 2
I really appreciate that. Is there any good places I can learn about htaccess?

Reply With Quote
  #5  
Old January 31st, 2008, 06:57 AM
ClickyB's Avatar
ClickyB ClickyB is offline
Scru u guys I'm goin home
SEO Chat Expert (3500 - 3999 posts)
 
Join Date: Mar 2004
Location: Gloucester (South West UK).
Posts: 3,921 ClickyB User rank is Sergeant Major (2000 - 5000 Reputation Level)ClickyB User rank is Sergeant Major (2000 - 5000 Reputation Level)ClickyB User rank is Sergeant Major (2000 - 5000 Reputation Level)ClickyB User rank is Sergeant Major (2000 - 5000 Reputation Level)ClickyB User rank is Sergeant Major (2000 - 5000 Reputation Level)ClickyB User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Months 4 Days 12 h 14 m 43 sec
Reputation Power: 50
Quote:
Originally Posted by seogoat
I really appreciate that. Is there any good places I can learn about htaccess?
Best place I know is here
__________________
ClickyB
"The quality of the visitor is more important than the volume".. Egol 22nd Feb 2008
New to SEO? Start Here: SEO FAQ
Forum Rules & Posting Guidelines

Reply With Quote
Reply

Viewing: SEO Chat ForumsOtherSEO Scripts > Htaccess Redirection Problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT