MyBB Community Forums

Full Version: What is the difference between HTML and PHP?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
What is the difference between HTML and PHP, is one better than the other?

Also how would you add a .php or .html after a url like mybb.com/forums.html or mybb.com/forums.php

I see that on mybb they use .html after there urls, except for user cp and some other urls, but when you make a forum, it's on .php So how would you set that or change it?
HTML is browser side, PHP is server side. HTML interacts with the browser, PHP interacts with the server. PHP connects to a database, HTML is markup and allows you to structure a webpage and give it (basic) styling. The difference is huge.

Is one better than the other? Is an apple better than an orange? We can't say. HTML is better for structuring, but without PHP, sites would be boring and there would be fewer forums, and those that did exist would look different on the backend.

htaccess rewrite. Turn on the SEO URL's in your settings (can't remember the name), and make sure that htaccess.txt is called .htaccess.
(2013-01-20, 09:35 PM)Seabody Wrote: [ -> ]HTML is browser side, PHP is server side. HTML interacts with the browser, PHP interacts with the server. PHP connects to a database, HTML is markup and allows you to structure a webpage and give it (basic) styling. The difference is huge.

Is one better than the other? Is an apple better than an orange? We can't say. HTML is better for structuring, but without PHP, sites would be boring and there would be fewer forums, and those that did exist would look different on the backend.

htaccess rewrite. Turn on the SEO URL's in your settings (can't remember the name), and make sure that htaccess.txt is called .htaccess.

Oh, so is it better to have .php at the end of urls or is it better to have .html at the end of urls, since it interacts with the browser?

Also I'm still kinda new with goolge seo and the rewrites, so how would I make a rewrite rule?
It's not better to have either, really. However, the extension usually tells the server how to parse it - so don't go naming PHP files whatever.html.

There's a setting in the Admin CP that does it all for you. I can't remember what it is (am currently locked out of my localhost's Admin CP) but you can find it pretty easily under Server Optimization Settings (or similar). Just make sure that your htaccess.txt file is called .htaccess.
OP is taking about URL extensions, not HTML and PHP themselves.

It doesn't really make any difference. .html and .php extensions are still used because that's what the extensions of the files on the server are named as. You could rewrite your homepage to become index.peacock if you really wanted to. It doesn't make any difference to search engines as long as they can visit them.

We use SEF urls here mainly because they're friendlier to the user.
(2013-01-20, 09:45 PM)Seabody Wrote: [ -> ]It's not better to have either, really. However, the extension usually tells the server how to parse it - so don't go naming PHP files whatever.html.

There's a setting in the Admin CP that does it all for you. I can't remember what it is (am currently locked out of my localhost's Admin CP) but you can find it pretty easily under Server Optimization Settings (or similar). Just make sure that your htaccess.txt file is called .htaccess.

Can you check on the mybb demo board?

How would I do this;
Enable search engine friendly URLs?
Search engine friendly URLs change the MyBB links to shorter URLs which search engines prefer and are easier to type. showthread.php?tid=1 becomes thread-1.html. Once this setting is enabled you need to make sure you have the MyBB .htaccess in your MyBB root directory (or the equivalent for your web server). Automatic detection may not work on all servers. Please see The MyBB wiki for assistance.

What would this do?
Enable search engine friendly URLs in Archive?
Search engine friendly URLs can be used in the archive. Once this setting is enabled ensure the archive still works as expected.

Also this;
Use GZip Page Compression?
Do you want to compress pages in GZip format when they are sent to the browser? This means quicker downloads for your visitors, and less traffic usage for you.

This also;
Send No Cache Headers
With this option you can prevent caching of the page by the browser.

This;
Enable XMLHttp request features?
This will enable or disable the XMLHttp request features.

And this;
*NIX Load Limiting
Limit the maximum server load before MyBB rejects people. 0 for none. Recommended limit is 5.0.

Also this;
Error Logging Location
The location of the log to send errors to, if specified.

How would I get to the Error logging location, cPanel maybe?

Also what is this;
Scrutinize User's IP address?
Do you want to check a user's IP address for HTTP_X_FORWARDED_FOR or HTTP_X_REAL_IP headers? If you're unsure, set this to no.

(2013-01-20, 09:46 PM)Nathan Malcolm Wrote: [ -> ]OP is taking about URL extensions, not HTML and PHP themselves.

It doesn't really make any difference. .html and .php extensions are still used because that's what the extensions of the files on the server are named as. You could rewrite your homepage to become index.peacock if you really wanted to. It doesn't make any difference to search engines as long as they can visit them.

We use SEF urls here mainly because they're friendlier to the user.

What is SEF urls?

Also I want to change the portal page the home page, so when a user first loads up my site, it will automatically load to the portal page, but the url won't say portal, i would be like mysite.com and if they try portal, it will redirect to mysite.com and for the home page, I want it to be mysite.com/Home.html which would be the portal page. Then for the Forums, I want it to be mysite.com/Forums.html also if you click on a forum name, because I use google seo, I want the end of that forum name to end with .html, as well with all of the other urls in my forum, I want it to end with .html except when you go to a member's profile, it would just be mysite.com/there-user-name like that. How would that?
SEF URLs stands for Search Engine Friendly URLs.

You need to add some lines in .htaccess for the redirect to be made possible.

# Provide Specific Index Page (Set the default handler)
DirectoryIndex portal.php
It's the difference between a mechanic vs a body repair shop.

One is aesthetic the other is the engine.
(2013-01-26, 11:03 AM)labrocca Wrote: [ -> ]It's the difference between a mechanic vs a body repair shop.

One is aesthetic the other is the engine.

That's a great analogy.
(2013-01-26, 03:51 PM)Josh H. Wrote: [ -> ]
(2013-01-26, 11:03 AM)labrocca Wrote: [ -> ]It's the difference between a mechanic vs a body repair shop.

One is aesthetic the other is the engine.

That's a great analogy.

Though I don't think that was the user's question.
Pages: 1 2