Nested nice urls problem using rewrite

Author Message

Alex Hansford

Thursday 26 August 2004 4:13:05 pm

Hi guys,

I have installed eZpublish and I have been trying to get the nice urls function working on the site before I start work on the template (and replacing the ezurl with ezroot, i think).

Real URL: http://www.alexhansford.com/index.php/ah/<b>weblog</b>
Intended URL: http://www.alexhansford.com/<b>weblog</b>

I have set up url rewriting with .htaccess and set url translation on, and it works a dream - removing the <b>index.php/ah/</b> stem fine. The problem occurs when i try to view pages underneath the section page such as:
http://www.alexhansford.com/weblog/another_blog. The site just gives a 404 error - the re-write rules seem not to be rewriting any urls deeper than <b>weblog</b>.

Does anyone have a solution to this? Is this a fault with Apache? (I think something with the rewriterule command might help, but I'm very new to Apache and would appreciate some help).

This is my current .htaccess file:

DefaultType application/x-httpd-php
php_value post_max_size 12M
Options Indexes FollowSymLinks Includes

<Files .htaccess>
order allow,deny
deny from all
</Files>

RewriteEngine On
RewriteRule ^([^./]+)/?$ /index.php/$1

And here is the code under the site.ini.append.php file under URL translator:

[URLTranslator]
# Use either enabled or disabled
Translation=enabled
# Enable this if you want to percieve the url as a path element
# for the node tree. By entering the path in the url and ending it
# with a .html you will get the correct node.
NodeTranslation=enabled

any help would be greatly appreciated!

Thanks

bisk

Friday 27 August 2004 12:55:05 am

try removing the forward slashes from the first part of the rewrite rule

RewriteRule ^([^.]+)?$ /index.php/$1

-------------------------------
http://www.kookfijn.nl & http://www.magento.be

Alex Hansford

Friday 27 August 2004 2:26:44 am

That worked a treat! Thanks!

Now all I've got to do is to put some exceptions in the .htaccess file and I can get rid of the www. too!

Thanks again!

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 19 2025 14:04:45
Script start
Timing: Jan 19 2025 14:04:45
Module start 'layout'
Timing: Jan 19 2025 14:04:45
Module start 'content'
Timing: Jan 19 2025 14:04:45
Module end 'content'
Timing: Jan 19 2025 14:04:45
Script end

Main resources:

Total runtime0.5424 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 589.2813152.6406
Module start 'layout' 0.00590.0030 741.921939.4922
Module start 'content' 0.00890.5325 781.4141500.8828
Module end 'content' 0.54150.0009 1,282.296912.4531
Script end 0.5424  1,294.7500 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.5538160.0002
Check MTime0.00120.2303160.0001
Mysql Total
Database connection0.00130.236910.0013
Mysqli_queries0.503492.8082570.0088
Looping result0.00040.0802550.0000
Template Total0.513694.720.2568
Template load0.00150.273220.0007
Template processing0.512194.399820.2560
Template load and register function0.00010.023410.0001
states
state_id_array0.00080.143810.0008
state_identifier_array0.00100.186920.0005
Override
Cache load0.00130.2317230.0001
Sytem overhead
Fetch class attribute can translate value0.00060.109120.0003
Fetch class attribute name0.00110.207930.0004
XML
Image XML parsing0.00020.035220.0001
class_abstraction
Instantiating content class attribute0.00000.001130.0000
General
dbfile0.00050.0997100.0001
String conversion0.00000.001840.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
3content/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
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/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: 17
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs