Am un site si vreau de exemplu daca cineva intra de pe url: www.extreamcs.com sa il redictioneze pe alta pagina. Si daca alcineva intra de pe url: www.google.ro pe site-ul meu sa nu il redictioneze..
Cum pot sa fac asta?
Cum redictionez spre alt site?
Moderators: Moderatori ajutatori, Moderatori
- pisoi.
- Fost moderator
- Posts: 961
- Joined: 29 Jul 2012, 02:29
- Detinator Steam: Da
- Detinator server CS: cs.lafraguri.ro
- SteamID: pisoi-ucs
- Reputatie: Fost moderator
Nume anterior : pisoino1 - Location: Targoviste.
- Has thanked: 93 times
- Been thanked: 31 times
- Contact:
Adaugi in overall_header.html
Code: Select all
<meta http-equiv="refresh" content="1;url=http://www.site.ro/forum/" />
- sharkstar
- Membru, skill +4
- Posts: 1735
- Joined: 24 Dec 2012, 15:51
- Detinator Steam: Da
- CS Status: Rupetot
- SteamID: privat
- Location: Bucuresti
- Has thanked: 70 times
- Been thanked: 42 times
Pai nu am phpbb3. Vreau php..pisoi. wrote:Adaugi in overall_header.htmlCode: Select all
<meta http-equiv="refresh" content="1;url=http://www.site.ro/forum/" />
Am gasit ceva gen
Code: Select all
<?php $allow = array("adresaip");
if(!in_array($_SERVER['REMOTE_ADDR'], $allow) && !in_array($_SERVER["HTTP_X_FORWARDED_FOR"], $allow)) {
header("Location: http://www.google.com");
exit();
} ?>
- grande_ecks
- Fost administrator
- Posts: 1495
- Joined: 18 Sep 2008, 00:35
- Detinator Steam: Da
- CS Status: Fii bun, ajută, rău poate orice prost.
- SteamID: /ID/Narmer
- Reputatie: Fost administrator
- Location: România, Sibiu.
- Been thanked: 33 times
- TwisteR42O..
- Membru, skill +4
- Posts: 1613
- Joined: 02 Feb 2014, 20:10
- Detinator Steam: Nu
- Has thanked: 23 times
- Been thanked: 26 times
Fa un index.html, care sa aiba urmatorul continut:
* la content="3 trebuie sa pui tu numarul de secunde la care vrei sa te redirectioneze.
Code: Select all
<html>
<head>
<meta http-equiv="refresh" content="3;url=http://www.domeniultau.com/" />
</head>
<body>
<h1>Redirecting in 3 seconds...</h1>
</body>
</html>
-
- Information
-
Who is online
Users browsing this forum: A k c 3 n 7, Bing [Bot], Dot [Bot] and 677 guests