5 Mar 2014 at 16:29 #1 sithlord sithlord Associate Joined 1 Jun 2007 Posts 840 Anyone on Vidahost got php running from inside .htm files ? I added: AddType application/x-httpd-php .htm AddType application/x-httpd-php .html to .htaccess but it seems it doesnt work Vidahost has some custom stuff going on.
Anyone on Vidahost got php running from inside .htm files ? I added: AddType application/x-httpd-php .htm AddType application/x-httpd-php .html to .htaccess but it seems it doesnt work Vidahost has some custom stuff going on.
5 Mar 2014 at 19:21 #2 sithlord sithlord Associate OP Joined 1 Jun 2007 Posts 840 Got it working with this: AddType application/x-httpd-php5 .htm .html Although SSI includes eg, #include virtual= dont work anymore. EDIT: nvm got it working using: AddOutputFilter INCLUDES .htm .php Last edited: 5 Mar 2014
Got it working with this: AddType application/x-httpd-php5 .htm .html Although SSI includes eg, #include virtual= dont work anymore. EDIT: nvm got it working using: AddOutputFilter INCLUDES .htm .php
5 Mar 2014 at 21:19 #3 AHarvey AHarvey Soldato Joined 6 Mar 2008 Posts 10,094 Location Stoke area wouldn't you just save them as .php flles instead of .htm or am I being dense?
6 Mar 2014 at 03:37 #4 sithlord sithlord Associate OP Joined 1 Jun 2007 Posts 840 AHarvey said: wouldn't you just save them as .php flles instead of .htm or am I being dense? Click to expand... Files already existed. Renaming them would lose search traffic.
AHarvey said: wouldn't you just save them as .php flles instead of .htm or am I being dense? Click to expand... Files already existed. Renaming them would lose search traffic.
6 Mar 2014 at 10:32 #5 Dj_Jestar Dj_Jestar Caporegime Joined 18 Oct 2002 Posts 29,509 Location Back in East London Do you not get punished for masking dynamic pages as static anymore?
6 Mar 2014 at 10:53 #6 thenewoc thenewoc Soldato Joined 9 Mar 2012 Posts 10,088 Location West Sussex, England Could you not change them to php files and then use mod_rewrite?
6 Mar 2014 at 13:30 #7 sithlord sithlord Associate OP Joined 1 Jun 2007 Posts 840 Could use mod_rewrite but its just as easy to use .htaccess.
6 Mar 2014 at 15:03 #8 Dj_Jestar Dj_Jestar Caporegime Joined 18 Oct 2002 Posts 29,509 Location Back in East London Doing it in .htaccess uses mod_rewrite, if you are rewriting.
6 Mar 2014 at 16:59 #9 sithlord sithlord Associate OP Joined 1 Jun 2007 Posts 840 Dj_Jestar said: Doing it in .htaccess uses mod_rewrite, if you are rewriting. Click to expand... No .htaccess is the directory level apache config file. Mod rewrite is a module which is separate and must be enabled in apache. They happen to use the same file AFIAK.
Dj_Jestar said: Doing it in .htaccess uses mod_rewrite, if you are rewriting. Click to expand... No .htaccess is the directory level apache config file. Mod rewrite is a module which is separate and must be enabled in apache. They happen to use the same file AFIAK.
6 Mar 2014 at 17:08 #10 Dj_Jestar Dj_Jestar Caporegime Joined 18 Oct 2002 Posts 29,509 Location Back in East London You can specify the rewrite rules in .htaccess, was the point I was making.
6 Mar 2014 at 17:15 #11 sithlord sithlord Associate OP Joined 1 Jun 2007 Posts 840 Dj_Jestar said: You can specify the rewrite rules in .htaccess, was the point I was making. Click to expand... Sure but: "Doing it in .htaccess uses mod_rewrite, if you are rewriting." Implies that it automatically uses mod_rewrite. Its separate from the .htaccess file and needs to be enabled by the webserver.
Dj_Jestar said: You can specify the rewrite rules in .htaccess, was the point I was making. Click to expand... Sure but: "Doing it in .htaccess uses mod_rewrite, if you are rewriting." Implies that it automatically uses mod_rewrite. Its separate from the .htaccess file and needs to be enabled by the webserver.
7 Mar 2014 at 09:44 #12 Dj_Jestar Dj_Jestar Caporegime Joined 18 Oct 2002 Posts 29,509 Location Back in East London It's trivial to enable it. It's even enabled on a default installation. 99.99999999% of webhosts have it enabled already.
It's trivial to enable it. It's even enabled on a default installation. 99.99999999% of webhosts have it enabled already.
7 Mar 2014 at 13:42 #13 Vulcan Vulcan Soldato Joined 15 Jan 2004 Posts 10,215 Dj_Jestar said: It's trivial to enable it. It's even enabled on a default installation. 99.99999999% of webhosts have it enabled already. Click to expand... Indeed, I'm with Vida and I use mod_rewrite via a .htaccess to remove .php?id=x.
Dj_Jestar said: It's trivial to enable it. It's even enabled on a default installation. 99.99999999% of webhosts have it enabled already. Click to expand... Indeed, I'm with Vida and I use mod_rewrite via a .htaccess to remove .php?id=x.