URI and .htaccess?

Author Message

Philippe VINCENT-ROYOL

Friday 08 February 2008 7:15:20 am

Hello,

I want to change url from <b>http://www.example.com/dir1/dir2/article</b> to <b>http://www.example.com/dir2/article</b>
How can i do this? I've try with a rewritingrule like

RewriteRule ^dir1/(.*)$ /$1 [R,L]

Someone can help me please?
Thanks

Certified Developer (4.1): http://auth.ez.no/certification/verify/272607
Certified Developer (4.4): http://auth.ez.no/certification/verify/377321

G+ : http://plus.tl/dspe
Twitter : http://twitter.com/dspe

Nicolas Martinez

Monday 11 February 2008 9:41:25 am

hi,

you can try this:

RewriteRule ^(.*)$ /dir1/$1 [L] 

NMartinez

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

Main resources:

Total runtime0.0163 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.0052 588.1328151.2109
Module start 'layout' 0.00520.0031 739.343836.6484
Module start 'content' 0.00830.0066 775.992290.2813
Module end 'content' 0.01490.0013 866.273429.9922
Script end 0.0162  896.2656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002213.6460140.0002
Check MTime0.00106.0971140.0001
Mysql Total
Database connection0.00074.443210.0007
Mysqli_queries0.002917.844530.0010
Looping result0.00000.115710.0000
Template Total0.00095.710.0009
Template load0.00074.233710.0007
Template processing0.00021.475210.0002
Override
Cache load0.00052.869810.0005
General
dbfile0.002716.742880.0003
String conversion0.00000.054240.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