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.