Jump to content

[SOLVED] Reidrecting Automatically


konetch

Recommended Posts

Hey,

 

This isn't a PHP question, but I was wondering how you redirected to a directory with out using a meta tag in and index.html file. For example the site http://www.sumopaint.com automatically redirects you to http://www.sumopaint.com/web.

 

How would you do this?

 

Thanks

Alex Konetchy

Link to comment
https://forums.phpfreaks.com/topic/157738-solved-reidrecting-automatically/
Share on other sites

Oh sorry, I couldn't find another forum it could fit under.

 

Anyway, I wanted the server to do it automatically. Originally I put this in the index.html file in the home directory:

 

<html>

<head>

<title>Redirect | KonetchReport</title>

<META http-equiv="refresh" content="0;URL=http://www.konetchreport.com/forum">

</head>

<body>

<div align="center">

<a href="http://www.konetchreport.com/forum">Click this link if the page didn't show up in your browser</a>

</div>

</body>

</html>

 

But everyone see this. So I wanted it to not appear on this page at all and just open into that directory at once.

 

 

 

In which case you're in the right place, you need to do this using php. Does your server support php, and have you ever used php?

 

If both those questions answer yes here's a starting point...

 

<?php
header('Location: http://www.konetchreport.com/forum');

Yeah. I do have some experience in php. I use it as content management, and for other simple functions, but I'm definitely not a professional with it. And yes my server does support PHP

 

@maq 

I never worked with .htaccess files either, since I never had to use them

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.