944,054 Members | Top Members by Rank

Oct 7th, 2005
0

Redirecting a Directory or page...

Expand Post »
Ok so you are having the same problem I am. You wanted to hide your directory listing because you were worried about someone seeing it and being able to manipulate it.

Or your index directory wasn't Index.html, it was something like Index.php, and you thought it just looked sloppy having your directory listing show up. (some what embarrassing to because you know everybody that tries to view it has to find the right index file or something like that).

Everybody has been telling you to use a .htaccess file right? Yeah, I thought so. I was told that to, but I couldn't ever get the dern things to work. So I went looking for an alternate method. Did a little HTML looking up and talked with a friend (ЯÄ?ŶŋĚ™) and we did some digging.

We finally came up with this very, very simple HTML code that you can edit and modify anyway that you want to, but here is how I am using it currently. I plan to use a Picture or Flash Animation for Directories that people should not be attempting to enter, but that will be later on.

<html>
<head>
<title>The 411~Exchange </title>
<meta http-equiv="refresh" content="4; url=http://www.daniweb.com">
</head>
<body bgcolor="#000000">
<br>
<br>
<br>
<br>
<br>
&nbsp;<p><b>
<a href="http://www.daniweb.com"><center><h1>You Are Entering DaniWeb</h1></a></b></p>
</p></center>
</color>
</body>
</html>

Like I mentioned. This code is just a simple and flexable one. Nothing complicated, and it doesn't have to be exactly like this. You don't need anything more than.


<HTML>
<Head>
<meta http-equiv="refresh" content="4; url=http://www.daniweb.com">
</HEAD>
</HTML>

Here is a site that you can view. Everything Redirects back here, and there is nothing else on the site. So it is not an add. It was created for the sole purpose to show how this works. Due to the domain .cjb.net though the site name will stay in the address bar when it redirects to daniweb. I turned url cloaking off, but it persists. Lame service

Click Here To View Demo


If you have questions. I will be happy to answer as best that I can


ahh a couple things first

<meta http-equiv="refresh" content="4; url=http://www.daniweb.com">

content="4 <- this number is the amount of seconds the page shows, and 0 is a allowed.
Similar Threads
Reputation Points: 35
Solved Threads: 9
Posting Whiz in Training
Lightninghawk is offline Offline
288 posts
since Jun 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Linux Servers and Apache Forum Timeline: mod_rewrite lowercase filenames
Next Thread in Linux Servers and Apache Forum Timeline: Need some help with .htaccess rediret...





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC