Jump to content

html redirect


otuatail

Recommended Posts

Hi. If this is poosibe it would help.  The website I have taken over has a lot of bagage. Every page has the side menu. so changing a link is a nightmare. All the pages are html. I want to replace one with PHP. Without going through every page to change one link, is it possible to have a dummy html page that re-directs to the PHP page. header('Location: ..) works in PHP but I need a html redirection here.

 

Any ideas

 

 

Paul.

 

Link to comment
Share on other sites

If you want to have 1 page for the menu and all other pages to include the menu (result: only one page has to be modified and all pages display the new menu), than you have to include the menu.

 

You have 1 page with the menu, this is a php page where you echo the html coded menu:

 

<?php

 

echo "

[all html goes here]

";

 

?>

 

Than in the page you want the menu being displayed, you include this menu file (lets say its called menu.php):

 

<?php

 

require("menu.php");

 

?>

[the rest of the page]

 

include() and require() have only one difference, and that is if the file couldn't be found, with require php wont be executed any further, however include() just executes everything like its fine.

 

I think this is what you're looking for...

 

Full-Demon

Link to comment
Share on other sites

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.