|
| Register now to interact with over 11,000 members! Registered users have Posting Privileges, free access to Private Messaging, Email Notifications and more. |
|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Join Date: May 2009
Location: UK
Posts: 40
Reputation: 3
|
Domain pointing help needed
Ok,
This should be really easy, in fact I've done it before and it was working, then suddenly it didn't any more.... I want gamescares.com when typed in to the address bar to redirect to gamescares.com/main/ as this is where the Joomla site content is located, gamescares.com is just an html page with a link to enter the main site. I've tried using the domain pointer tool in ops, clicked subdirectory on the domain and added the 'main' folder after htdocs to look like htdocs/main So I try loading up gamescares.com/main after this and get a 'this page has no index file' message. I've tried manually adding code to my htaccess file and code that really should work just does nothing at all! Can anyone help me with this please? |
|
|
|
|
#2 |
|
Join Date: Nov 2002
Location: Solomons Island
Posts: 3,118
Reputation: 318
|
You can put redirect code in the index file in htdocs to do this.
If the index file in htdocs is a htm or html file, you can use code like this, which should be placed within the HEAD tags - <meta HTTP-EQUIV="REFRESH" content="0; url=http://gamescares.com/main/">. If the index file is a PHP file, you can use the header function, like this - header("location: ./main/"). This line should be the first line of index.php (technically, the second line).
__________________
-bruce /* somdcomputerguy */ 'If you change the way you look at things, the things you look at change.' |
|
|
|
|
#3 |
|
Join Date: May 2009
Location: UK
Posts: 40
Reputation: 3
|
Hadn't thought of trying that snowmaker, in fact I've never heard of that before! I'll give it a try, many thanks for the reply.
![]() *Edit, tried that but still not getting the redirect, hmmmm. I've left the code in so you can check it viewing page source at www.gamescares.com That would have been a nice easy fix, damn! Thanks again though. *Edit again! It does work! But I do get to see the page for a few seconds before it redirects, I'll just stick up a 'redirecting' notice on the index page. Solved, thank you very much snowmaker. |
|
|
|
|
#4 |
|
Join Date: Nov 2002
Location: Solomons Island
Posts: 3,118
Reputation: 318
|
It works for me. I followed the link you posted, it loaded your htdocs index, then redirected to the index in htdocs/main. Try a hard refresh (ctrl-F5 with FF, ctrl or shift F5 with IE, probably either of or one of for any other browser) to reload the index page code your browser is reading.
__________________
-bruce /* somdcomputerguy */ 'If you change the way you look at things, the things you look at change.' |
|
|
|
|
#5 |
|
Join Date: May 2009
Location: UK
Posts: 40
Reputation: 3
|
Yeah many thanks, I did edit my previous post, that's brilliant, have a great day my friend.
![]() |
|
|
|
|
#6 |
|
Join Date: Nov 2002
Location: Solomons Island
Posts: 3,118
Reputation: 318
|
If you're using the HTML code, try replacing hxxp://gamescares.com/main/ with ./main/, like in the PHP code. This may make it (the redirection) a little faster..
edit: just to note, I replaced http with hxxp.
__________________
-bruce /* somdcomputerguy */ 'If you change the way you look at things, the things you look at change.' Last edited by snowmaker; 6-28-12 at 01:04 PM.. Reason: edit |
|
|
|
|
#7 |
|
Join Date: May 2009
Location: UK
Posts: 40
Reputation: 3
|
Will do, I've put up a loading screen on the page now anyway, my site's never been a quick loader, I think that's a Joomla thing from past experience though...
Thanks yet again! |
|
|
|
|
#8 |
|
Join Date: May 2009
Location: UK
Posts: 40
Reputation: 3
|
Whoa that is actually quicker, brilliant!
|
|
|
|
|
#9 |
|
Join Date: Nov 2002
Location: Solomons Island
Posts: 3,118
Reputation: 318
|
You bet, happy to help wherever I can. You have a nice day too.
__________________
-bruce /* somdcomputerguy */ 'If you change the way you look at things, the things you look at change.' |
|
|
|
|
#10 |
|
Custom User Title
Join Date: Aug 2006
Location: Michigan
Posts: 2,669
Reputation: 337
|
From an SEO standpoint hwoever, does this hurt the site?
I would also still put a link on the page in case, for some reason, the redirect doesn't work for someone. |
|
|
|
|
#11 |
|
Join Date: May 2009
Location: UK
Posts: 40
Reputation: 3
|
Good point entrecon, I will add a link just in case, SEO should be fine, Google pulls up the /main directory for the search results that matter for my site just fine.
Thanks. |
|
|
![]() |
| Thread Tools | |
|
|