Skip to main content

I would prefer to do this with mod_rewrite and SSI.

First put the path into an environment variable

RewriteCond %{IS_SUBREQ} false
RewriteRule ^(/.*\.html) /page.shtml [E:filename[E=filename:$1]

then process that in the shtml file

<!--#include virtual="$filename"-->

(parts Parts of this solution are based on a stackoverflow question  : https://stackoverflow.com/questions/40133/getting-apache-to-modify-static-webpages-on-the-fly/1196832 )

I would prefer to do this with mod_rewrite and SSI.

First put the path into an environment variable

RewriteCond %{IS_SUBREQ} false
RewriteRule ^(/.*\.html) /page.shtml [E:filename:$1]

then process that in the shtml file

<!--#include virtual="$filename"-->

(parts of this solution are based on a stackoverflow question  https://stackoverflow.com/questions/40133/getting-apache-to-modify-static-webpages-on-the-fly/1196832 )

I would prefer to do this with mod_rewrite and SSI.

First put the path into an environment variable

RewriteCond %{IS_SUBREQ} false
RewriteRule ^(/.*\.html) /page.shtml [E=filename:$1]

then process that in the shtml file

<!--#include virtual="$filename"-->

Parts of this solution are based on a stackoverflow question: https://stackoverflow.com/questions/40133/getting-apache-to-modify-static-webpages-on-the-fly/1196832 )

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

I would prefer to do this with mod_rewrite and SSI.

First put the path into an environment variable

RewriteCond %{IS_SUBREQ} false
RewriteRule ^(/.*\.html) /page.shtml [E:filename:$1]

then process that in the shtml file

<!--#include virtual="$filename"-->

(parts of this solution are based on a stackoverflow question http://stackoverflow.com/questions/40133/getting-apache-to-modify-static-webpages-on-the-fly/1196832https://stackoverflow.com/questions/40133/getting-apache-to-modify-static-webpages-on-the-fly/1196832 )

I would prefer to do this with mod_rewrite and SSI.

First put the path into an environment variable

RewriteCond %{IS_SUBREQ} false
RewriteRule ^(/.*\.html) /page.shtml [E:filename:$1]

then process that in the shtml file

<!--#include virtual="$filename"-->

(parts of this solution are based on a stackoverflow question http://stackoverflow.com/questions/40133/getting-apache-to-modify-static-webpages-on-the-fly/1196832 )

I would prefer to do this with mod_rewrite and SSI.

First put the path into an environment variable

RewriteCond %{IS_SUBREQ} false
RewriteRule ^(/.*\.html) /page.shtml [E:filename:$1]

then process that in the shtml file

<!--#include virtual="$filename"-->

(parts of this solution are based on a stackoverflow question https://stackoverflow.com/questions/40133/getting-apache-to-modify-static-webpages-on-the-fly/1196832 )

changed question to include solution
Source Link

I would prefer to do this with mod_rewrite and SSI, however it seems that there is no way in SSI to include a file that is passed as a parameter or environment var.

Does anybody know a way to do this?First put the path into an environment variable


RewriteCond %{IS_SUBREQ} false
RewriteRule ^(/.*\.html) /page.shtml [E:filename:$1]

<!--#include virtual="some_variable"-->then process that in the shtml file


<!--#include virtual="$filename"-->

(parts of this solution are based on a stackoverflow question http://stackoverflow.com/questions/40133/getting-apache-to-modify-static-webpages-on-the-fly/1196832 )

I would prefer to do this with mod_rewrite and SSI, however it seems that there is no way in SSI to include a file that is passed as a parameter or environment var.

Does anybody know a way to do this?

<!--#include virtual="some_variable"-->

I would prefer to do this with mod_rewrite and SSI.

First put the path into an environment variable


RewriteCond %{IS_SUBREQ} false
RewriteRule ^(/.*\.html) /page.shtml [E:filename:$1]

then process that in the shtml file


<!--#include virtual="$filename"-->

(parts of this solution are based on a stackoverflow question http://stackoverflow.com/questions/40133/getting-apache-to-modify-static-webpages-on-the-fly/1196832 )

fixed html quoting
Source Link
Loading
Source Link
Loading