Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Google Forum


You are currently viewing our The Google Forum as a guest. Please register to participate.
Login



Reply
301 redirect my .html page
Old 03-09-2010, 05:30 AM 301 redirect my .html page
Super Spam Talker

Latest Blog Post:
Omegle.com
Posts: 800
Trades: 0
Hi guys

So im trying to re-direct my index.html file to my site root www.mysite.com

Redirect 301 /index.html http://www.mysite.com/

Is that right, as it dont look right lol ?

Woc
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
usearchme is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-09-2010, 05:48 AM Re: 301 redirect my .html page
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Assuming this is in .htaccess

You will have a infinite redirect loop with that rule.
The server will ALWAYS serve "index.html" (or any other index document) for requests to the site root (or a folder root).

You will need to redirect using THE_REQUEST variable
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-09-2010, 05:52 AM Re: 301 redirect my .html page
Super Spam Talker

Latest Blog Post:
Omegle.com
Posts: 800
Trades: 0
Hmm didnt think it was right

ive got this now

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

Obviously changing the url.com to your domain, is that correct ?

Woc
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
usearchme is offline
Reply With Quote
View Public Profile
 
Old 03-09-2010, 06:05 AM Re: 301 redirect my .html page
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
.htaccess rules are not my forte at all, but it looks something like
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-09-2010, 09:11 AM Re: 301 redirect my .html page
Super Spam Talker

Latest Blog Post:
Omegle.com
Posts: 800
Trades: 0
Just in case anyone else needs to know that is indeed the correct code for ur .htaccess file, it worked fine, thanks for hte links chris !
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
usearchme is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to 301 redirect my .html page
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.47558 seconds with 12 queries