Forward old domain?

Connect with other users about what to run on your webhosting (and how to run it) here.
User avatar
Hatz
This is my homepage
This is my homepage
Posts: 84
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Thu Jan 18, 2007 5:07 pm
Contact:

Forward old domain?

Post by Hatz »

my old domain snkclan.nuclearfallout.net still works, but is there a way to forward some1 straight to http://www.snk-klan.net if they go to the old address to force them to use the new url?
SNK-KLAN.NET - CS Denver - Realistic Mods - Fast DL - Believe It...

•Realistic Mods to help promote a more real cs!
•Forums are at http://www.snk-klan.net
•IP of the server is 72.5.102.41:27015
•19 slot server.
•HLTV
User avatar
Edge100x
Founder
Founder
Posts: 12948
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Post by Edge100x »

To do it effectively, you'd probably have to use mod_rewrite: http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html. mod_rewrite is not for the faint of heart, however 8O
User avatar
Hatz
This is my homepage
This is my homepage
Posts: 84
Joined: Thu Jan 18, 2007 5:07 pm
Contact:

Post by Hatz »

f....that's what i hear, but what about this as a solution?

what about for the index.html file? Is there some type of code to be written like this:

META
HTTP-EQUIV="Refresh"
CONTENT="0; URL=http://www.snk-klan.net/forums"


Only more as with an "if" function, if they go to snkclan.nuclearfallout.net, then changed to snk-klan.net?
SNK-KLAN.NET - CS Denver - Realistic Mods - Fast DL - Believe It...

•Realistic Mods to help promote a more real cs!
•Forums are at http://www.snk-klan.net
•IP of the server is 72.5.102.41:27015
•19 slot server.
•HLTV
User avatar
Edge100x
Founder
Founder
Posts: 12948
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Post by Edge100x »

If you want to go with that type of solution, you would actually have to do some PHP or Javascript scripting, because you'll need to check the domain they used when the page is loaded to see if it is correct or not. For instance, you could edit the index.php file and have it check the hostname and if it does not match http://www.snk-klan.net, print a redirect (forward) to http://www.snk-klan.net and exit the script instead of showing the forums page. You would need to edit each script (viewforum.php, viewtopic.php, groupcp.php, etc) in this way for your solution to be complete.

In contrast, the mod_rewrite solution is something that you would need to do in just one place -- the .htaccess file for the folder.
BnD|Sleeper
This is my homepage
This is my homepage
Posts: 140
Joined: Wed Aug 02, 2006 8:52 am

Post by BnD|Sleeper »

Well if you want every directory to redirect to the new directory you'll probably need a mod rewrite or more tedious scripts like already stated. However, to just redirect the easy way directly to ONE URL (this is what I use for simplicity, but mod rewrite would technically be better :-)):

Code: Select all

<SCRIPT LANGUAGE="JavaScript">
window.location="http://www.bndclan.com";
</script>
I use that to redirect from bndclan.nuclearfallout.net --> bndclan.com

because geez typing that whole URL out isn't fun anyways :-)

I would say for simplicity, look up web stats as to what files are most frequently used (IE: viewforum.php, viewtopic.PHP, index.php, etc...) and put that line into all it's dependent files to their respective directories so that everytime someone goes to the snk.nfo.net/viewforum.php --> snk-klan.net/viewforum.php

Worrying about EVERY single file would be ridiculous, just choose the important 3 in my opinion are the only ones necessary to redirect from/to.

Sleeper
http://www.BnDClan.com

WC3:FT CS 1.6: wc3.bndclan.com:27015 or 64.94.101.52:27015)

http://rentals.nuclearfallout.net/rent. ... ferrer=bnd
User avatar
Edge100x
Founder
Founder
Posts: 12948
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Post by Edge100x »

Sleeper, he would also need comparison statements in there or it would create an endless loop of redirects ;).
User avatar
Hatz
This is my homepage
This is my homepage
Posts: 84
Joined: Thu Jan 18, 2007 5:07 pm
Contact:

Post by Hatz »

ya ^^ lol

<SCRIPT LANGUAGE="JavaScript">
window.location="http://www.snk-klan.net/forums/index.php";
</script>


loop....loop....loop
SNK-KLAN.NET - CS Denver - Realistic Mods - Fast DL - Believe It...

•Realistic Mods to help promote a more real cs!
•Forums are at http://www.snk-klan.net
•IP of the server is 72.5.102.41:27015
•19 slot server.
•HLTV
BnD|Sleeper
This is my homepage
This is my homepage
Posts: 140
Joined: Wed Aug 02, 2006 8:52 am

Post by BnD|Sleeper »

Hatz wrote:ya ^^ lol

<SCRIPT LANGUAGE="JavaScript">
window.location="http://www.snk-klan.net/forums/index.php";
</script>


loop....loop....loop
I do disagree as that is the exact code I am executing on it's own; obviously I am not using any other scripts besides that one to do the work so it only redirects to the website specified.

Visit http://bndclan.nuclearfallout.net and it will automatically forward you to http://www.bndclan.com without any hitches as if that is the URL you typed.

I see no reason for comparisons when as long as it's customized to current directory, it will forward to the right directory.

IE:
I modify index.html in my base directory to point to index.php (base) of my new website.

Then I modify viewforum file to point to the viewforum file of my new website, and so on and so forth with all files/directories desiring to be forwarded.

Sleeper
http://www.BnDClan.com

WC3:FT CS 1.6: wc3.bndclan.com:27015 or 64.94.101.52:27015)

http://rentals.nuclearfallout.net/rent. ... ferrer=bnd
User avatar
Edge100x
Founder
Founder
Posts: 12948
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Post by Edge100x »

Sleeper, you are overlooking the fact that he is using us as a host for both his new domain and his current website. They are served out of the same folder. By changing a file to redirect, he changes the behavior on both sites.

I still believe that mod_rewrite is by far the most effective and maintainable, and possibly even the easiest, solution.
BnD|Sleeper
This is my homepage
This is my homepage
Posts: 140
Joined: Wed Aug 02, 2006 8:52 am

Post by BnD|Sleeper »

Edge100x wrote:Sleeper, you are overlooking the fact that he is using us as a host for both his new domain and his current website. They are served out of the same folder. By changing a file to redirect, he changes the behavior on both sites.

I still believe that mod_rewrite is by far the most effective and maintainable, and possibly even the easiest, solution.
Yes that was an oversight and I am past my limit on brain functions for a while so I'll quit while behind.

Sleeper
http://www.BnDClan.com

WC3:FT CS 1.6: wc3.bndclan.com:27015 or 64.94.101.52:27015)

http://rentals.nuclearfallout.net/rent. ... ferrer=bnd
User avatar
Hatz
This is my homepage
This is my homepage
Posts: 84
Joined: Thu Jan 18, 2007 5:07 pm
Contact:

Post by Hatz »

well i should add that i put that code into index_body.tpl, i didnt put the script into the index.html at the base ftp yet but the main thing im trying to do is forward snkclan.nuclearfallout.net to snk-klan.net which would entail me editing the index.html, ive done that that isnt an issue it works.

But since most users have snkclan.nuclearfallout.net/forums/index.php in their address history, they are like me and eveyrone else and just click that when they want to go to the forums, so id like that to forward to snk-klan.net/forums/index.php.....that's all the redirecting i need, so i cant do it? lol i dont wanna do the mod rewrite i took one look at that and said f that....
SNK-KLAN.NET - CS Denver - Realistic Mods - Fast DL - Believe It...

•Realistic Mods to help promote a more real cs!
•Forums are at http://www.snk-klan.net
•IP of the server is 72.5.102.41:27015
•19 slot server.
•HLTV
User avatar
Hatz
This is my homepage
This is my homepage
Posts: 84
Joined: Thu Jan 18, 2007 5:07 pm
Contact:

Post by Hatz »

Say umm....i just noticed that my search function no longer works on the forums, but author search does work for some reason. I'm assuming this is something to do with it not accessing the tables? Every search comes up with "No topics or posts met your search criteria."
SNK-KLAN.NET - CS Denver - Realistic Mods - Fast DL - Believe It...

•Realistic Mods to help promote a more real cs!
•Forums are at http://www.snk-klan.net
•IP of the server is 72.5.102.41:27015
•19 slot server.
•HLTV
User avatar
Hatz
This is my homepage
This is my homepage
Posts: 84
Joined: Thu Jan 18, 2007 5:07 pm
Contact:

Post by Hatz »

bump, anyone happen to know why it's doin this, any guess?
SNK-KLAN.NET - CS Denver - Realistic Mods - Fast DL - Believe It...

•Realistic Mods to help promote a more real cs!
•Forums are at http://www.snk-klan.net
•IP of the server is 72.5.102.41:27015
•19 slot server.
•HLTV
User avatar
Edge100x
Founder
Founder
Posts: 12948
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Post by Edge100x »

I haven't heard of that happening before and I don't know too much about the internals of phpBB, so it's hard to say what's going on. But if you can turn on a debugging mode of some sort and get the SQL query it's running, then send that to me in email, I can try to analyze it.
User avatar
Hatz
This is my homepage
This is my homepage
Posts: 84
Joined: Thu Jan 18, 2007 5:07 pm
Contact:

Post by Hatz »

It's always on debug mode, no error is occuring. The problem i think is with the new url and the dns or whatever. See when words are submitted on a post, all of them are inserted into the sql search table. It seems as if that table is empty and the data from the old table didnt transfer over....not sure how to fix that
SNK-KLAN.NET - CS Denver - Realistic Mods - Fast DL - Believe It...

•Realistic Mods to help promote a more real cs!
•Forums are at http://www.snk-klan.net
•IP of the server is 72.5.102.41:27015
•19 slot server.
•HLTV
Post Reply