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
https://forums.phpfreaks.com/topic/45158-html-redirect/
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
https://forums.phpfreaks.com/topic/45158-html-redirect/#findComment-219215
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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