Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[PHP] Redirecting Some Codes.. Hard to sum up in a few words.

Experienced Elementalist
Joined
Apr 22, 2008
Messages
215
Reaction score
1
Ok, well this is a little hard to explain but i have my retro on localhost and i want to host my own DCRS and External Texts + Variables on localhost too but i cannot connect to my own IP address hence the reason i use 127.0.0.1 in my loader and everyone else uses my external ip and i want the same sort of system for my DCRS ect.. anyway here is an example of my IP redirection i would appreciate any help.

PHP:
if($remote_ip == "127.0.0.1" || $remote_ip == "localhost" && $server_on_localhost == 1){
$ip = "127.0.0.1";
}

I just need a code like this i can add to client.php that gives me 127.0.0.1/dcrs or what ever and everyone else

Thanks.
 
hello
Loyal Member
Joined
Jun 24, 2004
Messages
726
Reaction score
158
Forgive me, but i don't get the point. Your script seems fine, so what do you expect of us ?
 
Experienced Elementalist
Joined
Apr 22, 2008
Messages
215
Reaction score
1
Thats the example script that only redirects my ip when i host my dcrs i need a new script to redirect the dcrs because they are on localhost which only i can connect to
 
Joined
Jun 8, 2007
Messages
1,985
Reaction score
490
I think your trying to host your DCRs from your home server? Well I don't know how to do that, but I think you need to open a port, and send a request to "http://your.host.IP.here:port" Make sure the port corresponds to your DCRs. Why don't you just get a free host?

Oh wait, I reread your origonal post, and it appears to me that you need a Mod-Rewrite script.
Google: "Apache Mod-Rewrite"
Then Put a .htaccess file in the folder with the DCRs. Make sure you have appache installed and configured correctly for Mod-Rewrite, and find a script on google to help change the URL appearance.

Mod-Rewrite basicly, can change a page called "www.example.com/index.php?PageName=home" to "www.example.com/home.html". It doesn't really change it.. grr

(Example: <a href="www.example.com/home.html">home</a>) If someone clicks that link, appache will look for "www.example.com/index.php?PageName=home", and display the contents of that page. All while leaving the URL: "www.example.com/home.html" in the address bar. user nor search engines can get through to see the actual page.

I really suck at Appache.. So I'd suggest using google, or someone else's advice.
 
Last edited:
Back
Top