Jump to content

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

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.