• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

[REQUEST] Script for acc maker in layout!

Kacperski

+ 18
Joined
Jan 23, 2010
Messages
22
Reaction score
0
Location
Czestochowa, Poland
Hiho, otlanders!

Im looking for a script (maybe i just have to edit something), that will change my site URL.
From this:
1.jpg

To this:
2.jpg


Of course not only guilds, but everything.
Rep++ for help :)
Thanks!
 
in fact i dont have experience in Acc's

but i think it does not matter about layouts
its about source of Acc and php language 'include'
 
in guilds.php

which u wana do in this file i think from this code

Code:
		$main_content .= '<center><h3>Now you are logged. Redirecting...</h3></center>';
		if($redirect == 'guilds')
			header("Location: ?subtopic=guilds");
		elseif($redirect == 'guild')
			header("Location: ?subtopic=guilds&action=show&guild=".$guild);
		else
			$main_content .= 'Wrong address to redirect!';
	}

who know php codes can help u its easy for him
 
Im a little (read: very much) greenish at this kind of business :P
Can you, or somebody else, tell me exactly what to do, please :)?
For you it's 2 minutes, for me it's 2 years :D

I've got the .htaccess file in the main folder. This is what's inside:
Options -Indexes
ErrorDocument 403 /index.php?subtopic=error&id=403
ErrorDocument 404 /index.php?subtopic=error&id=404

By the way, I have no damn idea what the hell are mod-rewrite rules :huh:
Thanks for help anyways :)
 
Last edited:
It's not 2 minutes.
For start I can give you code from new acc. maker which has 'nice links'.
It's .htaccess file:
Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
It will load file 'index.php' always when you try to load not existing file/folder. So when you try to open 'xx.com/guilds/' it will load index.php in 'base' web server folder (if folder 'guilds' doesn't exist!!).
In PHP are some global variables and in one of them you can find what user tried to open.
It will open index.php script, but in $_SERVER['REQUEST_URI'] will be 'http://xx.com/guilds/'.
You can use this information to load page that player wanted to visit.


For example it's part of my paste.ots.me page (index.php in main folder):
PHP:
$load_id = 0;
$show_types = array('normal', 'text', 'download');
$show_type = 'normal';
$params = explode('/', trim(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), '/'));

if(isset($params[0]))
{
	$load_id = (int) $params[0];
	if(isset($params[1]))
	{
		if(in_array($params[1], $show_types))
		{
			$show_type = $params[1];
		}
		else
		{
			header('Location: http://paste.ots.me/' . $load_id);
		}
	}
}
User can open:
OTS.ME - Paste - 2884
folder '2884' doesn't exist on server and it loads index.php script and in this script I detect what folder(s) user tried to open, it can be:
OTS.ME - Paste - 2884
or:
http://paste.ots.me/2884/text
or:
http://paste.ots.me/2884/download
 

Similar threads

Replies
0
Views
301
Back
Top