MyBB Community Forums

Full Version: Overwriting Portal .php wit html page ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible? I code mainly in HTML, I still dislike php, I have just started helping a friend with their website, but the portal is in .php I have created the same page in HTML and have uploaded it via ftp, so its ready and raring to go, BUT .... I cant find the right place to override the http://sitename.com/portal.php with http://sitename.com/portal.html.

Any help is appreciated, I am totally new to MyBB, and though easy in some (majority) areas, other bits are still confusing me Smile

Thanks Smile
What do you mean by 'override'...?? There are no links to portal.php be default so just put a link to portal.html instead...
I cannot see where to place the link though Smile Like I said, I have come in half way and am new to MyBB, could you direct me to the correct section to put the html link Smile thanks Smile
If you're using the default theme, you can add a link to the header template.
Do you want html as extension or do you just want some static HTML page?

Since PHP is supposed to be embedded into HTML, you can actually name any HTML page .php and get it like that - even if there is no PHP code in it. So if you made a static HTML page you could just name it portal.php anyway (but take care not to overwrite it when updating).
Ok thanks for the help, I will try that Smile
Otherwise if you want to change portal.php links to portal.html, there are these occurences:

inc/languages/english/online.lang.php:73:$l['viewing_portal'] = "Viewing <a href=\"portal.php\">Portal</a> Page";
portal.php:9: * $Id: portal.php 4339 2009-04-04 18:26:37Z Tikitiki $
portal.php:14:define('THIS_SCRIPT', 'portal.php');
portal.php:49:add_breadcrumb($lang->nav_portal, "portal.php");
portal.php:99:	redirect("portal.php", $lang->redirect_loggedin);

None of these will be relevant if you are not going to be using portal.html instead of portal.php though, since those links can only be seen if you actually do use portal.php. You'd only have to change them if you renamed portal.php to something else.
The easiest way is to place a javascript redirect on portal.php so that it automatically redirects to the new page.
There is no such thing as a javascript redirect. You can redirect with meta tags; or even better with .htaccess; you definitely shouldn't use javascript for that. Wink
Use a PHP redirect header.