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 June 10th, 2008, 03:30 AM
rohitb rohitb is offline
Registered User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 12 rohitb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 53 m 4 sec
Reputation Power: 0
.Htaccess file

I am working on some client projects and want to remove the canonical issue. Therefore, i created .htaccess file on the root of the server and its working fine. By doing this all the non www url of the website is redirected to open with www url.

But still i am facing a little problem. I am not able to redirected /index.php page and ./index.html page to absolute URL of the website.

The problem is with both .co.uk and .com domain.

Kindly provide suggest.

Reply With Quote
  #2  
Old June 10th, 2008, 04:14 AM
pro_seo's Avatar
pro_seo pro_seo is online now
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 23 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
Use this:

For redirecting www.domain.com/index.php to /

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


For redirecting /index.html to /

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


**replace domain.com with your site URL
__________________

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.**

Last edited by pro_seo : June 10th, 2008 at 04:18 AM.

Reply With Quote
  #3  
Old June 10th, 2008, 04:57 AM
rohitb rohitb is offline
Registered User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 12 rohitb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 53 m 4 sec
Reputation Power: 0
Thanks

Hi,

Thanks for the message. I implemented the both given code for my websites and its working fine.

But i am still looking for .htaccess file code for .co.uk domain.

Is someone using this code, please share it.

Domain name: www dot domainname dot co dot uk

Website developed in PHP.

Last edited by rohitb : June 10th, 2008 at 05:00 AM.

Reply With Quote
  #4  
Old June 10th, 2008, 05:04 AM
pro_seo's Avatar
pro_seo pro_seo is online now
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 23 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
Quote:
Originally Posted by rohitb
Hi,

Thanks for the message. I implemented the both given code for my websites and its working fine.

But i am still looking for .htaccess file code for .co.uk domain.

Is someone using this code, please share it.

Domain name: www dot domainname dot co dot uk

Website developed in PHP.


So?

What's the problem...

Just replace domain.com in the above codes with domain.co.uk i.e - your .co.uk domain URL

Simple!

Reply With Quote
  #5  
Old June 10th, 2008, 05:40 AM
rohitb rohitb is offline
Registered User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 12 rohitb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 53 m 4 sec
Reputation Power: 0
I have already checked this but its not working. If you are working on any .co.uk domain then provide me the htaccess file code.

Reply With Quote
  #6  
Old June 10th, 2008, 06:01 AM
dzine's Avatar
dzine dzine is offline
Vergruizer: Vot tebe khuy
SEO Chat Intermediate (1500 - 1999 posts)
 
Join Date: Oct 2005
Location: in a life preserver @ seorefugee
Posts: 1,922 dzine User rank is Sergeant (500 - 2000 Reputation Level)dzine User rank is Sergeant (500 - 2000 Reputation Level)dzine User rank is Sergeant (500 - 2000 Reputation Level)dzine User rank is Sergeant (500 - 2000 Reputation Level)dzine User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Month 5 Days 21 h 8 m
Reputation Power: 23
Does your host -- where the .co.uk site resides -- allow the use of .htaccess? Is it even an Apache server?

Reply With Quote
  #7  
Old June 10th, 2008, 06:15 AM
rohitb rohitb is offline
Registered User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 12 rohitb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 53 m 4 sec
Reputation Power: 0
I can redirect the non www url to www url but not able to redirect /index.php to the absolute URL. I will ask the same to the website hosting provider.

Thanks for suggestion.

Reply With Quote
  #8  
Old June 10th, 2008, 06:18 AM
pro_seo's Avatar
pro_seo pro_seo is online now
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 23 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
Quote:
Originally Posted by rohitb
I can redirect the non www url to www url but not able to redirect /index.php to the absolute URL. I will ask the same to the website hosting provider.

Thanks for suggestion.


Show us your domain URL and also the entire content of your HTACCESS.

Maybe then we could guide you on this

Reply With Quote
  #9  
Old June 10th, 2008, 06:42 AM
rohitb rohitb is offline
Registered User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 12 rohitb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 53 m 4 sec
Reputation Power: 0
As i am new member of seo chat i couldn't post links till 17 june & 30 post.

Well thanks for your kind help.

Reply With Quote
  #10  
Old June 10th, 2008, 06:50 AM
pro_seo's Avatar
pro_seo pro_seo is online now
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 23 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
Quote:
Originally Posted by rohitb
As i am new member of seo chat i couldn't post links till 17 june & 30 post.

Well thanks for your kind help.


You can post in this format:

domain(dot)co(dot)uk

Reply With Quote
  #11  
Old June 10th, 2008, 07:00 AM
rohitb rohitb is offline
Registered User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 12 rohitb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 53 m 4 sec
Reputation Power: 0
RewriteEngine On
rewritecond %{h t t p _ h o s t} ^domain(dot)co(dot)uk
rewriteRule ^(.*) h t t p : / / www(dot)domain(dot)co(dot)uk/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/
RewriteRule ^(.*)index\.php$ http : / / www(dot)domain(dot)co(dot)uk/$1 [R=301,L]

Note: please ignore space at some places.

Reply With Quote
Reply

Viewing: SEO Chat ForumsOtherSEO Scripts > .Htaccess file


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 5 hosted by Hostway
Stay green...Green IT