where can i use redirect!

Author Message

Christine Romel

Thursday 14 October 2004 5:38:06 am

Hi..
my site now is on a test version and not published yet.i want to use redirect so that when the main page is accessed say: www.mySite.com redirect it to www.mySite.com/test/
i want to do this instead of removing the whole site from test to the root..
how and where can i use that..
i got that javascript <meta http-equiv="refresh" content="0";url="http://www.mySite.com/test/">..

so if it is right.. which index file and where should i place that script!

i need a fast reply plzzz..

thanx for ur cooperation:)

Alex Jones

Thursday 14 October 2004 6:53:32 am

Hi, I think you would be better off using an .htaccess file for this - assuming you are using Apache. To do this, follow these steps:

1. In a text editor create a file named .htaccess (the dot is important)
2. Add this line to the file:

redirect 301 / /test/ 

3. Save the file, and upload it to the root directory on the site

The reason, I recommend this method is that it will ensure search engines know that the site has been moved, and it is transparent to the user, whereas a meta refresh can be stored in the browser's history, frustrating the user if they try to use their browser's back button. They click on the back arrow, which takes them to the page with the meta refresh, which automatically sends them back to the page they were on - an annoying loop.

One quick note, you may need to tell your operating system, and/or your HTML editors may not show you the .htaccess file once it is created, as the dot at the beginning indicates that it is supposed to be a hidden file. So, you may need to change some settings to make sure that you can see it.

<b>Additional Info:</b> See 'Strategy 2' on http://www.tamingthebeast.net/articles3/spiders-301-redirect.htm

Hope this helps. If not, let me know.

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

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 16:36:26
Script start
Timing: Jan 18 2025 16:36:26
Module start 'layout'
Timing: Jan 18 2025 16:36:26
Module start 'content'
Timing: Jan 18 2025 16:36:28
Module end 'content'
Timing: Jan 18 2025 16:36:28
Script end

Main resources:

Total runtime1.1894 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.0051 587.9063152.6250
Module start 'layout' 0.00510.0031 740.531339.4297
Module start 'content' 0.00821.1798 779.9609523.5781
Module end 'content' 1.18800.0014 1,303.53918.1797
Script end 1.1894  1,311.7188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2650160.0002
Check MTime0.00130.1093160.0001
Mysql Total
Database connection0.00070.057010.0007
Mysqli_queries1.143996.1676540.0212
Looping result0.00050.0440520.0000
Template Total1.156597.220.5783
Template load0.00220.181320.0011
Template processing1.154497.050220.5772
Template load and register function0.00010.012410.0001
states
state_id_array0.00130.111410.0013
state_identifier_array0.00130.106520.0006
Override
Cache load0.00180.1507220.0001
Sytem overhead
Fetch class attribute can translate value0.00070.054820.0003
Fetch class attribute name0.00130.107030.0004
XML
Image XML parsing0.00070.058820.0003
class_abstraction
Instantiating content class attribute0.00000.001030.0000
General
dbfile0.00090.0718160.0001
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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs