MyBB Codes
[TUT] Convert the pages from PHP to HTML - Printable Version

+- MyBB Codes (http://www.mybbcodes.com)
+-- Forum: Mods Database (/forumdisplay.php?fid=4)
+--- Forum: Tutorials for 1.4.x (/forumdisplay.php?fid=29)
+--- Thread: [TUT] Convert the pages from PHP to HTML (/showthread.php?tid=952)


[TUT] Convert the pages from PHP to HTML - Kevin - 03-27-2010 05:02 AM

Hello,
By using this tutorial you can convert your pages from php to html.
*Html pages are more important in Google (SEO)!

1- Go to ACP --> Configuration --> Server and Optimization Options

2- In "Enable search engine friendly URLs" select Enable.

3- Add the contains of htaccess.txt file to .htaccess file of your host.

4- Example:
#

# MyBB "search engine friendly" URL rewrites

# - Note, for these to work with MyBB please make sure you have

#   the setting enabled in the Admin CP and you have this file

#   named .htaccess

#

<IfModule mod_rewrite.c>

    RewriteEngine on

    RewriteRule ^forum-([0-9]+).html forumdisplay.php?fid=$1 [L,QSA]

    RewriteRule ^forum-([0-9]+)-page-([0-9]+).html forumdisplay.php?fid=$1&page=$2 [L,QSA]



    RewriteRule ^thread-([0-9]+).html showthread.php?tid=$1 [L,QSA]

    RewriteRule ^thread-([0-9]+)-page-([0-9]+).html showthread.php?tid=$1&page=$2 [L,QSA]

    RewriteRule ^thread-([0-9]+)-lastpost.html showthread.php?tid=$1&action=lastpost [L,QSA]

    RewriteRule ^thread-([0-9]+)-nextnewest.html showthread.php?tid=$1&action=nextnewest [L,QSA]

    RewriteRule ^thread-([0-9]+)-nextoldest.html showthread.php?tid=$1&action=nextoldest [L,QSA]

    RewriteRule ^thread-([0-9]+)-newpost.html showthread.php?tid=$1&action=newpost [L,QSA]

    RewriteRule ^thread-([0-9]+)-post-([0-9]+).html showthread.php?tid=$1&pid=$2 [L,QSA]



    RewriteRule ^post-([0-9]+).html showthread.php?pid=$1 [L,QSA]



    RewriteRule ^announcement-([0-9]+).html announcements.php?aid=$1 [L,QSA]



    RewriteRule ^user-([0-9]+).html member.php?action=profile&uid=$1 [L,QSA]



    RewriteRule ^calendar-([0-9]+).html calendar.php?calendar=$1 [L,QSA]

    RewriteRule ^calendar-([0-9]+)-year-([0-9]+).html calendar.php?action=yearview&calendar=$1&year=$2 [L,QSA]

    RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+).html calendar.php?calendar=$1&year=$2&month=$3 [L,QSA]

    RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+).html calendar.php?action=dayview&calendar=$1&year=$2&month=$3&day=$4 [L,QSA]

    RewriteRule ^calendar-([0-9]+)-week-(n?[0-9]+).html calendar.php?action=weekview&calendar=$1&week=$2 [L,QSA]



    RewriteRule ^event-([0-9]+).html calendar.php?action=event&eid=$1 [L,QSA]

Author : GreyWolf & Ojoobe (Translate to English by Kevin)


RE: [TUT] Convert the pages from PHP to HTML - Bane95 - 04-24-2010 02:27 AM

I do not know just what this


RE: [TUT] Convert the pages from PHP to HTML - exdiogene - 04-24-2010 09:03 AM

This is a Search Engine Optimisation, by changing the ".php" URL extensions to ".html" using the ".htaccess" file and a MyBB feature... Wink


RE: [TUT] Convert the pages from PHP to HTML - alexborow - 11-24-2010 12:17 AM

If you want to convert the page of PHP to HTML for these there are so many advance facility can be available in all these there are several features can be possible in all these there are so many things which is great to know about it.


RE: [TUT] Convert the pages from PHP to HTML - aaronflinch - 06-24-2011 01:44 AM

This tutorial is nicely explained us and I am satisfied with it. if you are serious about getting into this, I suggest you start with learning xhtml, then go to php.


RE: [TUT] Convert the pages from PHP to HTML - Philly - 07-28-2011 01:06 AM

Thanks for sharing this tut is great!