Path

ez projects / ezcore / forum / general / [bug] wrong rewriterule in...


[bug] wrong RewriteRule in ezcore/doc/ajax.txt

You need to be logged in to post messages in the forums. New users may register here.

Damien Pitard

Member since:
09 January 2008

Posts: 19

Tuesday 23 September 2008 2:43:42 pm

The rewrite rules documented in ezcore/doc/ajax.txt
RewriteRule ezcore/.* /index_ajax.php [L] and RewriteRule mymodule/.* /index_ajax.php [L]
disable access to design files (extension/ezcore/design/* or extension/mymodule/design/*)

To reproduce :
Try to load http://yoursite.com/extension/ezc...ign/standard/javascript/accordion.js, you will have an error in xml provided by index_ajax.php

Fix :
I thing the right RewriteRule to only catch the url "http://yoursite.com/ezcore" is :

RewriteRule <i>^/ezcore/.* /index_ajax.php [L]

or for other extension

RewriteRule <i>^/mymodule/.* /index_ajax.php [L]

Damien
Up

André R.

Member since:
14 January 2008

Posts: 170

Wednesday 24 September 2008 10:16:59 am

I'm not so sure that rewrite rule will work in all setups, the rewrite rule is taken from the existing ezp rules.

doc:



       RewriteRule content/treemenu/? /index_treemenu.php [L]




.htaccess_root:



RewriteRule content/treemenu/? index_treemenu.php


RewriteRule index_treemenu.php - [L]




So I just guess there is a reason for not using ^/, though I fail to see what it could be right now.

Work around is to specify view name as well, like:



RewriteRule ezcore/call/ /index_ajax.php [L]


RewriteRule ezcore/run/ /index_ajax.php [L]



Lead Engineer eZ Publish
@: http://twitter.com/andrerom

Up

You need to be logged in to post messages in the forums. New users may register here.