Forums / Install & configuration / Mod_Rewrite: PHP -> HTML

Mod_Rewrite: PHP -> HTML

Author Message

Kevin Landers

Friday 28 November 2003 6:17:17 pm

It is my understanding that mod_rewrite can be used in certain circumstances for making a dynamic PHP page into a static HTML page.

I am curious as to whether this can be done with eZ publish and mod_rewrite.

I would prefer all output to be in HTML for our clients.

Any help is kindly appreciated,
Kevin L.

Marco Zinn

Saturday 29 November 2003 4:58:25 am

Hi Kevin,
your understanding may not be completly correct.
What you can do is this:
- Use ezPublish to create all your pages dynamically
- "Freeze"(copy, mirror) some or all of these pages. That means: Save the dynamically created pages of ez3 to static HTML. ez3 does IMHO not have a feature to do this (some kind of "export to static HTML"), but you can use some website copy tool for this.
- If all of your site is static now, you probably need no rewrite rule
- If some is dynamical (Forums), you can use rewrite rules to "switch" between static page serving and dynamic page servering (ez), depending of the URL for example.

Some links for this
- http://ez.no/developer/ez_publish_3/contributions/ez_sitecopier
- http://www.httrack.com/
- http://ez.no/developer/ez_publish_3/forum/setup_design/benchmarks_dont_look_too_great_more_efficient_caching_is_needed
(lower part of the thread)

Marco
http://www.hyperroad-design.com

Marino Carlos

Monday 01 December 2003 6:33:53 pm

Also, with mod_rewrite what you can do is that any request to a .html page be served by a php script. That way, you can request index.html, for example, and instruct the server to serve index.php.

The result is that the page name at the URL will end in .html, but it will be build by the same php script anyway. So it wont convert dynamic page to static ones, but URLs will look like if they were static html files.

There are different opinions about search engines indexing better html urls than php ones, and maybe this can be one of the only reasons to use mod_rewrite for this purpose (if it were true).

Also keep in mind that extra rewriting rules means extra for Apache.

Paul Forsyth

Tuesday 02 December 2003 12:29:45 am

sorry, wrong forum

eZ debug

Timing: Jan 19 2025 03:23:59
Script start
Timing: Jan 19 2025 03:23:59
Module start 'content'
Timing: Jan 19 2025 03:24:01
Module end 'content'
Timing: Jan 19 2025 03:24:01
Script end

Main resources:

Total runtime1.5674 sec
Peak memory usage4,096.0000 KB
Database Queries201

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 588.9531180.8359
Module start 'content' 0.00661.3540 769.7891615.9297
Module end 'content' 1.36060.2067 1,385.7188333.3984
Script end 1.5673  1,719.1172 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00440.2809210.0002
Check MTime0.00150.0939210.0001
Mysql Total
Database connection0.00080.050610.0008
Mysqli_queries1.467893.64712010.0073
Looping result0.00270.17061990.0000
Template Total1.533997.920.7670
Template load0.00190.121320.0010
Template processing1.532097.742220.7660
Template load and register function0.00020.012110.0002
states
state_id_array0.00190.123110.0019
state_identifier_array0.00130.081220.0006
Override
Cache load0.00160.1010290.0001
Sytem overhead
Fetch class attribute can translate value0.00160.104650.0003
Fetch class attribute name0.00110.072450.0002
XML
Image XML parsing0.00130.083350.0003
class_abstraction
Instantiating content class attribute0.00000.000750.0000
General
dbfile0.01881.2024270.0007
String conversion0.00000.000330.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs