Html question

I know NOTHING about website design. I am the uber noob. That said, I have installed some forums on some website space I have. The forums are at www.domain.com to the forums? Do I write an index.html file that does that?

Mike

Crazymike,

What kind of forum software?

Does your webspace do php?

If so, you’ll want to do what’s known as a 301 redirect.  It’s what happens when you go to hackingthemainframe.com/smf/"

If it does do php, it’s easy.  Let me know (private message) and I’ll tell you what to put in an index.php file.

Oh, post it. Now you got me curious, it is simpler than an html redirect?

Well, HTML redirects only work if people have javascript on.  And then it’s ugly, 'cause it loads the page for a sec, then redirects it.  Or worse, it says “click here to continue” or “you will be redirected in 5 seconds.” 

That’s so 1997.

What you want to do is make an index.php file in the root folder and put this one line in it

<? header("Location:  [newurl.com/togoto/](http://newurl.com/togoto/)"); ?>

As an example, check hackingthemainframe.com/rcmp

and compare to hackingthemainframe.com/lame.php

It’s also the way I get rid of “WWW” from addresses.  I fricken hate WWW.  It’s so over already.

try menino.com  for examples.

Hmm, that is simple. I’ll have to change all those pages with a 5 second refresh while you read "Hey! We moved 5 years ago!"
Best I saw was a skihill redirect page. Downloaded a 1.5MB jpg, resized to 160x120 in html and added ‘we’ve got our own domain. You are being redirected there’. 20 minute operation in dialup days.

Do you have any idea how many people I’ve run into trying WWW.library,fsjames.com??
Almost as many as think you have to go to msn.com, type in www.fsjames.com, wait for the search and click on the result to get our local page…

Thanks for the help Mig. I’m pretty sure I can do php, but I guess I’ll find out tomorrow when I give this a try. Anything special about creating the file?

I agree with you about the WWW thing. I am so seriously tired of it. Now that I know how this works I’ll be re-directing to just the domain.

Mike

Here’s something I was reading about lately:

the #1 query on google is now “yahoo” and the #1 query on yahoo is “google.”

Never underestimate the stupidity of the masses. Most people wouldn’t know how to change a homepage on the browser. So if they have google set as their homepage, and they want to go to yahoo, they type yahoo into google. And vice-versa. Weird.

So people are more likely to search for an address than type in the URL in the address bar. Most don’t know the difference between the address bar and the search, etc.

Here’s HTMF’s keywords for January 2007:

Notice what is first?

[original attachment deleted after 2 years]

Quick, operator, what’s the number for 911?

Why would anybody see the need to search google for “hackingthemainframe.com”?  It’s like “man, I forgot the address for hackingthemainframe.com.  I’d better search google for it.”

Used to be Pizza222 in Vancouver when I worked for directory service. In a room of 50 operators, every four minutes or so you’d here one say (in the most condescending Lily Tomlin voice they could) “Two-two-two, two-two-two-two” and the whole room snickered for a minute…

I PHP.
CLICK!
php include!

<?php include_once "/var/www/html/domain/web/caged/lorem_ipsum.php"; ?>

Save a text file with .php extension and include it, it follows your css.
Give luser access to only /var/www/html/domain/web/caged/

Spend 3 hours 15 times to slap it into luser’s head “SAVE AS” “SAVE AS” and “.php” “.php"
3 more showing 'click on the Big E that says ‘shortcut to website’ and click on your file, hold the button down (that’s right the left button) and drag it into the window and let go. Let go. LET GO!!!”

Dwarf cats?

[quote=“MiG”]
Well, HTML redirects only work if people have javascript on. [/quote]

Mig is there a good amount of people out there that won’t have java script on? I guess maybe for a security reason. Just curious, I have been using the “ugly” way.

[quote=“MiG”]
If so, you’ll want to do what’s known as a 301 redirect.[/quote]

Thanks for this Mig. I just tried it and it’s totally works.

Mike

hi guys,

im trying the redirect and the no www. with out any luck
here is my httpd.conf

RewriteEngine On RewriteCond %{HTTP_HOST} !^ghostintheshell.ca [NC] RewriteRule ^(.*)$ [ghostintheshell.ca](http://ghostintheshell.ca)%{REQUEST_URI} [R=301,L]

<VirtualHost 209.145.106.99:80>
ServerName www.ghostintheshell.ca
ServerAlias  ghostintheshell.ca  *. ghostintheshell.ca
DocumentRoot /www/webroot/site1

 
<VirtualHost 209.145.106.99:80>
ServerName arcade.ghostintheshell.ca
DocumentRoot /www/webroot/site1/arcade
 

<VirtualHost 209.145.106.99:80>
ServerName shane.ghostintheshell.ca
DocumentRoot /www/webroot/site1/shane
 

<VirtualHost 209.145.106.99:80>
ServerName home.ghostintheshell.ca
DocumentRoot /www/webroot/site1/home
 

<VirtualHost 209.145.106.99:80>
ServerName davidwatson.no-ip.com
DocumentRoot /www/webroot/site2

<VirtualHost 209.145.106.99:80>
ServerName butterfly69.no-ip.org
DocumentRoot /www/webroot/site3

<VirtualHost 209.145.106.99:80>
ServerName butterfly69.com
DocumentRoot /www/webroot/site3

<VirtualHost 209.145.106.99:80>
ServerName www.butterfly69.com
DocumentRoot /www/webroot/site3

<VirtualHost 209.145.106.99:80>
ServerName rupertchat.no-ip.org
DocumentRoot /www/webroot/site4

<VirtualHost 209.145.106.99:80>
ServerName www.kaienislandwolves.com
DocumentRoot /www/webroot/site5

<VirtualHost 209.145.106.99:80>
ServerName kaienislandwolves.com
DocumentRoot /www/webroot/site5

<VirtualHost 209.145.106.99:80>
ServerName www.princerupertnews.com
ServerAlias princerupertnews.com *. princerupertnews.com
DocumentRoot /www/webroot/site4

<VirtualHost 209.145.106.99:80>
ServerName davidwatsonphotography.com
DocumentRoot /www/webroot/site2

<VirtualHost 209.145.106.99:80>
ServerName www.davidwatsonphotography.com
DocumentRoot /www/webroot/site2

RewriteEngine On
RewriteCond %{HTTP_HOST} !^davidwatsonphotography.com [NC]
RewriteRule ^(.*)$ davidwatsonphotography.com%{REQUEST_URI} [R=301,L]

my ghostintheshell.ca works fine, with www or with out, but davidwatsonphotography.com will not work with out the www.

I wouldn’t do the rewrite or redirect stuff in your httpd.conf file – just do it in php as in the examples earlier in the thread.

Hi Mig thanks. I did that here is an an example that i used for my index.php.

<? header("Location:  [davidwatsonphotography.com/index1.php](http://davidwatsonphotography.com/index1.php)"); ?>

Don’t do both, though.  Don’t do the re-write URL thing and the redirect thing as well, or you’ll create a loop.

wierd Mig i did that like you said it would not redirect. hmmmm damn

Get rid of the HTML tags.  No need for that stuff, you don’t want headers sent except for the redirect.  Just have the one php line in the file.

haha just looking at the servename & document roots reminded me of a couple years ago. They got mad, didn’t want to be library.fortstjames.ca they wanted to stay TILDE library!
I cant even remember how i used to do that…