Business help and advice forum for starting and growing small businesses - Teneric Business Forums
Login Register FAQ Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools
(#41)
Old
CanzDesign Offline
Business Director
 
Posts: 88
Join Date: Nov 2006
Location: New Zealand
Send a message via MSN to CanzDesign
Re: Which front page link to use? - 12-05-2007, 05:05 AM

Hi Tony.

I didn't mean my comment as anything but a comment, just thought it was good thinking on the part of the people that brought those domain names.

About the .htaccess file and using it to change the files you want, I just tried doing it on our .htaccess and those particular redirects don't seem to work.

It only works to redirect a local and global domain name to the same page. And non www to the www equivant eg taking the / out after the url redirect didn't make the page open without the /

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^canzdesign.com [nc]
rewriterule ^(.*)$ http://www.canzdesign.com/$1 [r=301,nc]
RewriteCond %{HTTP_HOST} ^canzdesign.co.nz [nc]
RewriteRule (.*) http://www.canzdesign.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.canzdesign.co.nz [nc]
RewriteRule (.*) http://www.canzdesign.com/$1 [R=301,L]

One thing to note though is the name of the file .htaccess with a period at the start and no txt filename.

Hope this is some help.
Reply With Quote
(#42)
Old
mikemac Offline
Business manager
 
Posts: 34
Join Date: Apr 2007
Re: Which front page link to use? - 15-05-2007, 02:43 AM

CanzDesign the 301 redirect that Tony put up a couple of pages back was only meant to redirect to the same page as you can see in his post below. I don't know what your redirect code is suppose to do.

Quote:
Originally Posted by TWD-Tony View Post
To create a .htaccess file is quite easy, all you need to do is open notepad / wordpad and copy the following into it (this is for a LINUX server by the way) :

RewriteEngine on

RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.yoursite\.com
RewriteRule (.*) http://www.yoursite.com/$1 [R=301,L]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html?
RewriteRule ^index\.html?$ http://www.yoursite.com/ [R=301,L]


Don't forget to change "yoursite.com" to your actual site... Once you have done this save the file as .htaccess (notice the ".") and upload it to the root of your website (alongside the index page).

Doing this will cure 2 evils - it will redirect http://yoursite.com to http://www.yoursite.com and it will also redirect yoursite.com/index.htm to yoursite.com

You CAN use the Google webmaster tool to cure the www / non www problem but this will only obviously work for Google and not the other SE's.
It seems this thread is being side tracked a bit. Tony should I still wait for a reply to this post below?

Note again that I am using Host Gator with unlimited domain names and I am using 2 addon domains at this time.

Quote:
Originally Posted by mikemac View Post
Hi Tony

I could not use the 301 redirect code that you gave me to add to my .htaccess file.

When I did it also redirected my 2 addon domains that I have on my server to www.my1stdomain.com/my1staddondomain/ and www.my1stdomain.com/my2ndaddondomain/ It also prevented me from logging into the forum that I am working on.

So I made the 301 redirect code for each addon domain with notepad and uploaded them to the folder for each addon domain to see what that would do. But it still redirected my 2 addon domains the same as above.

Maybe I did something wrong? When I did this they showed in my addon domain folders as .htaccess.txt not just .htaccess

Is there any other way of redirecting mydomain.com and www.mydomain.com/index.html to www.mydomain.com when I have addon domains other than buying a seperate hosting package for each domain?

Thanks
Mike
And I know the file is called .htaccess not .htaccess.txt. I just do not know how to make a .htaccess file with notepad without it becoming .htaccess.txt

Mike
Reply With Quote
(#43)
Old
matt1biz Offline
Business Director
 
Posts: 77
Join Date: Sep 2005
Location: London UK
Re: Which front page link to use? - 15-05-2007, 09:37 AM

Quote:
And I know the file is called .htaccess not .htaccess.txt. I just do not know how to make a .htaccess file with notepad without it becoming .htaccess.txt
Right click on the file on your desktop, choose reaname and manually remove the .txt part of the filename.
Reply With Quote
(#44)
Old
mikemac Offline
Business manager
 
Posts: 34
Join Date: Apr 2007
Re: Which front page link to use? - 15-05-2007, 06:37 PM

Darn. Matt that just about worked.

My operating system wouldn't let me rename the files to .htaccess on my desktop but I was able to rename them once I uploaded the files to my server.

When I did it my 2 addon domains showed like this www.my1staddondomain.com and www.my2ndaddondomain.com like they should.

But I wasn't able to log into the forum that I am working on.

The forum is in one of my addon domain directories with it's own folder in that directory. So I probably couldn't log into it because the forum is in it's own directory. Is that right?

When I deleted the three 301 redirects I was able to log into the forum again.

I wonder if it would make sense to add a .htaccess redirect file to both my addon domain directory as well as within the forum folder of the same addon domain directory? Would that cause a conflict?

Thanks
Mike
Reply With Quote

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Submit to these directories peterjhale Internet Marketing Forum 18 13-05-2007 11:26 AM
Do you want a link on our website? MK Printing Buy sell or trade 3 12-10-2006 03:52 PM
Link problem Ian J Internet Marketing Forum 1 23-01-2006 04:02 PM
Link exchange with page it has pr 3 ore more Ulik Search Engine Optimisation Forum 1 24-04-2005 02:11 PM



Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0 ©2007, Crawlability, Inc.