Reply
Domain name isn't pointing correctly?
Old 10-19-2009, 04:09 PM Domain name isn't pointing correctly?
Novice Talker

Posts: 13
Trades: 0
Hi guys, I've got an online photography gallery that I've implemented code on to make it so that the page won't cache (if it caches then users must clear their cache in order to see any updates or changes)...

while the no-cache code works, I think the problem I'm having is related to my domain.

Basically, I have one server, and two domain names. My second domain is forwarded to a file on my server (index.php) that uses a stylesheet and embeds the flash gallery into the page.

So right now, my second domain is pointing to: http://www.domain1.com/gallery/index.php

index.php looks like this:
Code:
<html>
<head>
<title></title>
<LINK href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<?
  Header('Cache-Control: no-cache');
  Header('Pragma: no-cache');
?>
<div id="flashcontent">
<embed src="gallery.swf" width="100%" height="100%"></embed>
</div>
</body>
</html>
But for some reason, when I visit www.domain2.com and view source, this is what it shows: <-- this URL still caches the page, as if it's not reading the code in the index.php file that the domain is forwarded to.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
  <title></title>
  <META name="description" content=""><META name="keywords" content="">
</head>
<frameset rows="100%,*" border="0">
  <frame src="http://www.domain1.com/gallery/index.php" frameborder="0" />
  <frame frameborder="0" noresize />
</frameset>

<!-- pageok -->
<!-- 02 -->
<!-- 7.12-->
</html>
HOWEVER, when I visit the direct URL to the gallery (www.domain1.com/gallery/index.php), it works fine, displays the correct source code, and doesn't cache the page.

How can I fix this? I can try to clarify more specifically if I was unclear.
Iconoclast is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 10-19-2009, 04:38 PM Re: Domain name isn't pointing correctly?
chrishirst's Avatar
Super Moderator

Posts: 22,221
Location: Blackpool. UK
Trades: 0
Thats because it is NOT being redirected. It opening the other page in a frame.
It's called "frame forwarding".
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-19-2009, 04:41 PM Re: Domain name isn't pointing correctly?
Novice Talker

Posts: 13
Trades: 0
So what do I need to do so that it's opening the index.php file containing my no-cache code instead of this frame instead?

Or can I use the code somewhere else to do it externally?
Iconoclast is offline
Reply With Quote
View Public Profile
 
Old 10-19-2009, 04:44 PM Re: Domain name isn't pointing correctly?
chrishirst's Avatar
Super Moderator

Posts: 22,221
Location: Blackpool. UK
Trades: 0
you need to set it as a permanent redirect, how will depend on what type of hosting or control panel you have.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-19-2009, 04:46 PM Re: Domain name isn't pointing correctly?
Novice Talker

Posts: 13
Trades: 0
How would I do that? My webhosting is with hosting24.com, my domains are with godaddy.com...my control panel is cPanelX.
Iconoclast is offline
Reply With Quote
View Public Profile
 
Old 10-19-2009, 04:56 PM Re: Domain name isn't pointing correctly?
chrishirst's Avatar
Super Moderator

Posts: 22,221
Location: Blackpool. UK
Trades: 0
Login to your control panel

in "Domains" you should have a "Redirects" icon/link click it

select Permanent (301) in the Type drop-down
select the domain to redirect.
type in the URI to redirect to.
Select "Redirect with or without www"
check the "Wild Card Redirect"
Click "Add" and confirm.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-19-2009, 05:06 PM Re: Domain name isn't pointing correctly?
Novice Talker

Posts: 13
Trades: 0
In the drop-down menu that appears, the only domain that shows up is my main domain:
domain1.com
Then to that, I add the rest of the URL to the page:
gallery/index.php
In the "redirects to" box, I type the URL to my secondary domain:
http://domain2.com
I checked the boxes that you said and clicked Add, and it says:
Quote:
There was a error adding redirect.

Apache detected an error in the Rewrite config.
httpd: Syntax error on line 15 of /home/accountname/public_html/.htaccess.35_DSRouG1OpnTIQx7d4zELEqbXEpkdU: RewriteCond without matching RewriteCond section
Please try again.
NOTE: In my GoDaddy Domain Manager, I still have domain forwarding and masking enabled for www.domain2.com. I'm not sure if that is why it's not working or not. Please advise?
Iconoclast is offline
Reply With Quote
View Public Profile
 
Old 10-19-2009, 05:57 PM Re: Domain name isn't pointing correctly?
Novice Talker

Posts: 13
Trades: 0
Okay, so I just watched this video:

http://www.cpanel.net/media/tutorials/redirects.htm

The difference I see in this tutorial and my cPanel setup is that he is creating a redirect that will redirect from one directory on his domain to another.

However, what I'm trying to do is apparently redirect my SECOND domain (which isn't associated to my webhosting account (other than the forwarding/masking) to a folder that IS hosted on my FIRST domain. How would I do this?
Iconoclast is offline
Reply With Quote
View Public Profile
 
Old 10-19-2009, 06:19 PM Re: Domain name isn't pointing correctly?
chrishirst's Avatar
Super Moderator

Posts: 22,221
Location: Blackpool. UK
Trades: 0
remove the forwarding and PARK the 2nd domain, then redirect it.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-19-2009, 06:45 PM Re: Domain name isn't pointing correctly?
Novice Talker

Posts: 13
Trades: 0
Can I still mask the URL with the parked domain?

In other words, when people visit www.domain2.com, I don't want them to see the true URL in the address bar (which would end up being www.domain1.com/gallery/index.php).

Please advise! Thanks!
Iconoclast is offline
Reply With Quote
View Public Profile
 
Old 10-19-2009, 06:54 PM Re: Domain name isn't pointing correctly?
chrishirst's Avatar
Super Moderator

Posts: 22,221
Location: Blackpool. UK
Trades: 0
Ok

best way to do that is to set the DocumentRoot for domain 2 to be the physical folder for the gallery.

Use the "Addon Domains" feature do that.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-19-2009, 07:01 PM Re: Domain name isn't pointing correctly?
Novice Talker

Posts: 13
Trades: 0
Can you explain to me how to do this in more detail? Sorry, I don't really know much about domains and setting them up and stuff like that.

Or point me in the direction of a list of instructions on what to do? I appreciate all your help mate!
Iconoclast is offline
Reply With Quote
View Public Profile
 
Old 10-19-2009, 07:30 PM Re: Domain name isn't pointing correctly?
chrishirst's Avatar
Super Moderator

Posts: 22,221
Location: Blackpool. UK
Trades: 0
Ok again in the domains section of cPanel there is an icon/link for Addon Domains" (Assuming this is active on your account)

In the form that opens:

Put your domain name in "New Domain Name"
In the "Document Root put in "gallery" (don't forget *nix is case sensitive)

Add a FTP username and password
Click Add Domain and that should be that, you may (or may not) have to make some adjustments to the navigation as it will be shared presumably and may not be working 100% but that should only need some scripting to detect which domain is being used and change the links accordingly.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-19-2009, 08:27 PM Re: Domain name isn't pointing correctly?
Novice Talker

Posts: 13
Trades: 0
Ok, wait, do I still have to park the domain through cPanel first?

Also, another question, for my domain through my GoDaddy Domain Manager, what do I do about nameservers? The options it gives me are:
- I want to park my domains.
- I want to foward my domains.
- I have a hosting account with these domains.
- I host my domains with another provider*

If I select the last option, it gives me several boxes to input nameserver addresses. The two nameserver addresses given to me by my host are:
ns11.hosting24.com - 174.36.208.130
ns12.hosting24.com - 174.37.194.23

So do I do that and then follow the steps you just outlined?


CURRENTLY: My domain is no longer forwarded/masked through my GoDaddy Manager, and is set to "I host my domains with another provider" with the following nameservers:
ns39.domaincontrol.com
ns40.domaincontrol.com

Last edited by Iconoclast; 10-19-2009 at 08:28 PM..
Iconoclast is offline
Reply With Quote
View Public Profile
 
Old 10-20-2009, 04:15 AM Re: Domain name isn't pointing correctly?
SiberForum's Avatar
Webmaster Talker

Posts: 615
Trades: 0
It sems you are doing everything right. But that is not instant process and you will need up to 70 hours for the DNS prolongation
__________________
Sibername.com
Canadian Domain Name Registration and Web Site Hosting Services
http://www.sibername.com
SiberForum is offline
Reply With Quote
View Public Profile
 
Old 10-20-2009, 05:44 AM Re: Domain name isn't pointing correctly?
chrishirst's Avatar
Super Moderator

Posts: 22,221
Location: Blackpool. UK
Trades: 0
Ok I guess from that, they are registered with one provider and hosted at a different provider.

IF SO, YES, at the registrar point the nameservers to the ones the hosting company gave you.

THEN use the ADDON DOMAINS option NOT the parking option at the hosting provider.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-20-2009, 11:37 AM Re: Domain name isn't pointing correctly?
Novice Talker

Posts: 13
Trades: 0
With Addon Domains, will I still be able to mask the URL?

In my cPanel > Addon Domains, I see this:

New Domain Name:__________
Subdomain/FTP Username:__________
Document: home/__________
Password:__________
Password (Again):__________
<Add Domain!>

How do I fill this out? Thanks again!
Iconoclast is offline
Reply With Quote
View Public Profile
 
Old 10-20-2009, 11:46 AM Re: Domain name isn't pointing correctly?
chrishirst's Avatar
Super Moderator

Posts: 22,221
Location: Blackpool. UK
Trades: 0
You won't need to mask the URL

domain2.tld will show EXACTLY the content that domain1/gallery/ does. (but NOT the rest of domain1 content.

That's why I pointed out you may need to script the navigation to avoid showing links to & from domain1
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-20-2009, 12:17 PM Re: Domain name isn't pointing correctly?
Novice Talker

Posts: 13
Trades: 0
Okay, I created the Addon domain...it points to my domain1.com/gallery directory.

Links shouldn't be an issue because my Flash gallery is embedded to fill 100% of the page, and everything is internal to that document...that's all the gallery page is.

Does it take a certain amount of time for it to take affect or something? - It seems to be working now...I will check to make sure the code that disables caching is functioning, as that's how this whole problem happened.


EDIT: Wow, it finally works! Can't thank you enough for all your help mate, I really appreciate it! +thanks

Last edited by Iconoclast; 10-20-2009 at 12:19 PM..
Iconoclast is offline
Reply With Quote
View Public Profile
 
Old 10-20-2009, 01:28 PM Re: Domain name isn't pointing correctly?
chrishirst's Avatar
Super Moderator

Posts: 22,221
Location: Blackpool. UK
Trades: 0
It should work straight away, there shouldn't be any DNS propogation or caching issue because it's the same IP just a different location for the content.


And I'll move this thread to server admin
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Domain name isn't pointing correctly?
 

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.19716 seconds with 13 queries