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 Loyal (3000 - 3499 posts)
 
Join Date: Apr 2006
Location: I N D I A
Posts: 3,267 pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level)pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level)pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level)pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level)pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level)pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level)pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Months 1 Week 3 Days 20 h 13 m 22 sec
Reputation Power: 87
Send a message via ICQ to pro_seo 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 Loyal (3000 - 3499 posts)
 
Join Date: Apr 2006
Location: I N D I A
Posts: 3,267 pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level)pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level)pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level)pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level)pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level)pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level)pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Months 1 Week 3 Days 20 h 13 m 22 sec
Reputation Power: 87
Send a message via ICQ to pro_seo 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 Regular (2000 - 2499 posts)
 
Join Date: Oct 2005
Location: in a life preserver @ seorefugee
Posts: 2,188 dzine User rank is Second Lieutenant (5000 - 10000 Reputation Level)dzine User rank is Second Lieutenant (5000 - 10000 Reputation Level)dzine User rank is Second Lieutenant (5000 - 10000 Reputation Level)dzine User rank is Second Lieutenant (5000 - 10000 Reputation Level)dzine User rank is Second Lieutenant (5000 - 10000 Reputation Level)dzine User rank is Second Lieutenant (5000 - 10000 Reputation Level)dzine User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 3 Days 18 h 27 m 50 sec
Reputation Power: 58
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 Loyal (3000 - 3499 posts)
 
Join Date: Apr 2006
Location: I N D I A
Posts: 3,267 pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level)pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level)pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level)pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level)pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level)pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level)pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Months 1 Week 3 Days 20 h 13 m 22 sec
Reputation Power: 87
Send a message via ICQ to pro_seo 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 Loyal (3000 - 3499 posts)
 
Join Date: Apr 2006
Location: I N D I A
Posts: 3,267 pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level)pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level)pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level)pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level)pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level)pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level)pro_seo User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Months 1 Week 3 Days 20 h 13 m 22 sec
Reputation Power: 87
Send a message via ICQ to pro_seo 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



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

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





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