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 30 2025 00:57:09
Script start
Timing: Jan 30 2025 00:57:09
Module start 'layout'
Timing: Jan 30 2025 00:57:09
Module start 'content'
Timing: Jan 30 2025 00:57:09
Module end 'content'
Timing: Jan 30 2025 00:57:09
Script end

Main resources:

Total runtime0.0143 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.2656151.2266
Module start 'layout' 0.00550.0024 739.492236.7031
Module start 'content' 0.00790.0048 776.195398.4063
Module end 'content' 0.01280.0014 874.601637.9766
Script end 0.0142  912.5781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002316.0016140.0002
Check MTime0.00107.3168140.0001
Mysql Total
Database connection0.00096.390310.0009
Mysqli_queries0.002215.362730.0007
Looping result0.00000.097010.0000
Template Total0.00117.510.0011
Template load0.00085.815010.0008
Template processing0.00021.592110.0002
Override
Cache load0.00053.836510.0005
General
dbfile0.00117.728280.0001
String conversion0.00000.046840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs