Redirect an ez sub directory to an external url

Author Message

Andy Boston

Friday 29 October 2010 4:30:40 am

Hi,

I've tried to use the wildcards to redirect ubmaviationnews.com/mrodata to a url external to the site but it doesn't work.

htaccess doesn't work either so does anyone have any ideas on how I can do this?

Thanks in advance :)

Heath

Friday 29 October 2010 5:37:07 am

I suggest using mod_rewrite or redirect apache configuration.

http://www.google.com/search?q=redirect+mod_rewrite

Cheers,

Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Gaetano Giunta

Friday 29 October 2010 6:03:32 am

The long and complex way is to develop an http redirect operator to put in your template (it should be put in the pagelayout and not in the node template for proper effect).

Principal Consultant International Business
Member of the Community Project Board

Marko Žmak

Thursday 04 November 2010 7:00:30 am

"

The long and complex way is to develop an http redirect operator to put in your template (it should be put in the pagelayout and not in the node template for proper effect).

"

Such an operator already exists:

http://projects.ez.no/redirect_operators

I've been using it a lot and it really does the job. Works with both eZ 4 and 3.

And it doesn't have to be included in the pagelayout.tpl, you can put it in node template also, but then you have to specify cache_ttl=0 in that template.

P.S. It can be really useful for redirecting full view of a file to the actual download of the file.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Marko Žmak

Thursday 04 November 2010 7:04:01 am

P.S. Some advantages of the redirect operators:

  • you don't have to hard code the url which redirects - it will work even if you change the name of the object that redirects
  • you can control the redirect using eZ template logic
  • you can have as many redirected object as you wish, without having to add redirects in .htaccess

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Andy Boston

Wednesday 17 November 2010 8:46:12 am

Thanks, I'll give that a go! :)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 15 2025 09:55:48
Script start
Timing: Jan 15 2025 09:55:48
Module start 'layout'
Timing: Jan 15 2025 09:55:48
Module start 'content'
Timing: Jan 15 2025 09:55:50
Module end 'content'
Timing: Jan 15 2025 09:55:50
Script end

Main resources:

Total runtime1.5250 sec
Peak memory usage6,144.0000 KB
Database Queries70

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 684.8594183.7031
Module start 'layout' 0.00710.0037 868.562552.6172
Module start 'content' 0.01081.5124 921.17971,942.0156
Module end 'content' 1.52320.0017 2,863.1953136.5078
Script end 1.5249  2,999.7031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00620.4035160.0004
Check MTime0.00130.0858160.0001
Mysql Total
Database connection0.00110.071610.0011
Mysqli_queries1.430293.7863700.0204
Looping result0.00070.0491680.0000
Template Total1.485497.420.7427
Template load0.00550.360520.0027
Template processing1.479897.041020.7399
Template load and register function0.00150.096110.0015
states
state_id_array0.00100.068110.0010
state_identifier_array0.00320.208720.0016
Override
Cache load0.00510.3356360.0001
Sytem overhead
Fetch class attribute can translate value0.00120.077040.0003
Fetch class attribute name0.00240.1567100.0002
XML
Image XML parsing0.00790.515740.0020
class_abstraction
Instantiating content class attribute0.00000.0017120.0000
General
dbfile0.00790.5173370.0002
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1content/datatype/view/ezxmltags/li.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/li.tplEdit templateOverride template
1content/datatype/view/ezxmltags/ul.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/ul.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 8

Time used to render debug report: 0.0002 secs