chibakun Posted August 7, 2015 Share Posted August 7, 2015 (edited) I have created a site with LAMP EasyPHP and I want to convert the entire site from php to html so that I can host it. It's just a basic bit of free webspace. index.php -> index.html gallery.php -> gallery.html gallery.php?cat=4 -> ? How can I do this please or is it even possible? Edited August 7, 2015 by chibakun Quote Link to comment https://forums.phpfreaks.com/topic/297679-php-site-to-html/ Share on other sites More sharing options...
Ch0cu3r Posted August 7, 2015 Share Posted August 7, 2015 Does the free host you are going to be using support PHP? If they do not then this is not possible. Quote Link to comment https://forums.phpfreaks.com/topic/297679-php-site-to-html/#findComment-1518218 Share on other sites More sharing options...
Barand Posted August 7, 2015 Share Posted August 7, 2015 Even if PHP is supported then changing the file names from .php to .html will prevent any php code from executing unless the server is reconfigured. Quote Link to comment https://forums.phpfreaks.com/topic/297679-php-site-to-html/#findComment-1518219 Share on other sites More sharing options...
scootstah Posted August 8, 2015 Share Posted August 8, 2015 PHP and HTML are not interchangeable languages. They do very different things. You cannot just convert PHP code to HTML. It's possible to generate static HTML from PHP, but then your site will not be dynamic, and you cannot do things like select data based on a query parameter, which is what it looks like you want. Pay a couple dollars a month and get some hosting. Quote Link to comment https://forums.phpfreaks.com/topic/297679-php-site-to-html/#findComment-1518310 Share on other sites More sharing options...
chibakun Posted August 9, 2015 Author Share Posted August 9, 2015 Thanks , I opted for awardspace which has a free service Quote Link to comment https://forums.phpfreaks.com/topic/297679-php-site-to-html/#findComment-1518352 Share on other sites More sharing options...
ginerjm Posted August 9, 2015 Share Posted August 9, 2015 And it supports PHP and allows you to modify the .ini file? (Remember - you get what you pay for.) Quote Link to comment https://forums.phpfreaks.com/topic/297679-php-site-to-html/#findComment-1518357 Share on other sites More sharing options...
abrahamgarcia27 Posted August 9, 2015 Share Posted August 9, 2015 I believe you can do this via .htaccess Check this out http://stackoverflow.com/questions/4548860/replacing-php-ext-with-html-through-htaccess Quote Link to comment https://forums.phpfreaks.com/topic/297679-php-site-to-html/#findComment-1518364 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.