Extension 'simple browser language redirect' : pb !!

Author Message

Anthony M.

Wednesday 01 October 2008 2:34:07 am

Hi,
i have 2 websites (1 in french and 1 in english), i changed this code in the extension to make the good redirection :

switch ($acceptedLang) {
                case 'fr':
                    header("Location: www.mysite.fr");
                    exit;
                    break;
                case 'en':
                    header("Location: http://www.mysite.com");
                    exit;
                    break;
                default:
                    header("Location: http://www.mysite.com");
                    exit;
            }

but it doesn't work under Firefox and Internet Explorer 7
is it normal ?

thanks for your help

Anthony

Jean-Luc Nguyen

Friday 17 October 2008 6:38:00 am

Hello,

What do you mean by "doesn't work under Firefox and Internet Explorer 7"?
As this is PHP code side, you should try to error_log() in order to trace the behaviour of your code.

http://www.acidre.com

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 18 2025 11:23:03
Script start
Timing: Jan 18 2025 11:23:03
Module start 'layout'
Timing: Jan 18 2025 11:23:03
Module start 'content'
Timing: Jan 18 2025 11:23:04
Module end 'content'
Timing: Jan 18 2025 11:23:04
Script end

Main resources:

Total runtime0.9938 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0078 589.1641152.6406
Module start 'layout' 0.00780.0025 741.804739.4766
Module start 'content' 0.01030.9819 781.2813523.4922
Module end 'content' 0.99230.0015 1,304.77348.1250
Script end 0.9937  1,312.8984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.3472160.0002
Check MTime0.00130.1356160.0001
Mysql Total
Database connection0.00130.134910.0013
Mysqli_queries0.943394.9174540.0175
Looping result0.00050.0501520.0000
Template Total0.954496.020.4772
Template load0.00300.304920.0015
Template processing0.951495.736520.4757
Template load and register function0.00020.021110.0002
states
state_id_array0.00090.092010.0009
state_identifier_array0.00110.114620.0006
Override
Cache load0.00260.2644140.0002
Sytem overhead
Fetch class attribute can translate value0.00060.063620.0003
Fetch class attribute name0.00120.116730.0004
XML
Image XML parsing0.00090.088020.0004
class_abstraction
Instantiating content class attribute0.00000.000730.0000
General
dbfile0.00080.0840160.0001
String conversion0.00000.000740.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs