hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Web Design and Content : HTML/PHP question...
Reply

Web Design and Content Subjects include, HTML, graphics, editors, CSS, Flash, graphics creation, placing of ads, ad serv companies, copyright, content and nearly anything else design related. Also talk about businesses that provide design services. If you link to your site, you must post in Web Site Reviews.
Forum Jump

HTML/PHP question...

Reply Post New Thread In Web Design and Content Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 10-01-2003, 11:37 PM
venomx venomx is offline
Web Hosting Evangelist
 
Join Date: Nov 2000
Location: Pennsylvania
Posts: 472

HTML/PHP question...


Hey all I got a small question...

Is there a way to do

<? header("location: http://www.zurax.com/search2.html");?>

in a .shtml file?

I want to do this in my 404 error page... so it sends them to my search site instead. Right now I have a dozen or so sites using a static page but when I need to make changes its a pain editing all of them....

__________________
John
http://www.zurax.com
http://www.jwshosting.com

Reply With Quote


Sponsored Links
  #2  
Old 10-02-2003, 04:11 AM
biggulp biggulp is offline
Junior Guru Wannabe
 
Join Date: Feb 2003
Posts: 84
I don't think SSI allows you to send HTTP headers, but you can always add a meta redirect or some javascript.

Code:
<META
HTTP-EQUIV="refresh" CONTENT="10;URL=http://www.domain.com">

Reply With Quote
  #3  
Old 10-02-2003, 09:09 PM
jjmac78 jjmac78 is offline
Junior Guru Wannabe
 
Join Date: Oct 2003
Location: Arkansas
Posts: 66
I created this function for that purpose:

function redirect($page){
echo "<script>{window.location='" . $page . "'}</script>";
echo '<center><br><br>If the page does not redirect in a few seconds, <a href="' . $page . '">click here</a>.</center><br><br>';
die();
}

It uses javascript, and if the user has javascript disabled it simply publishes a links directing them to 'click here' if the page does not redirect.

I did this because i was tired of messing with the headers and the fact you cant have outputted aything to the browser after a header redirect.

Reply With Quote
Sponsored Links
Reply

Related posts from TheWhir.com
Title Type Date Posted
German Court Rules Internet Essential, Cut Off Customers Can Seek ISP Compensation Web Hosting News 2013-01-25 16:06:32
Browsers Block Unauthorized Digital Certificate Issued by Turkish CA TURKTRUST Web Hosting News 2013-01-04 12:55:27
Joomla Hosting Study Shows Speed, Uptime Top Selling Points of a Web Host Web Hosting News 2012-11-07 15:06:36
Rackspace Blog Looks at Easy Outsourcing for App Development Blog 2012-03-05 19:07:48
Blackberry the UnCloud Blog 2011-10-14 15:28:54


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?