I have a problem with generated url by ZF:
My directory layout is :
www\
index.php
js\
css\
img\
My url to access the index.php file is : http://localhost/gf/test/index.php
I have written a rewrite rule for ISAPI_Rewrite (IIS), everything except
directories js, css and img shoud go to the index.php file:
RewriteRule ^/gf/test/((?!(js|css|img))(\w*)/.*)$ /gf/test/index.php?$1
[L,I]
I have also defined a route:
':lang/:fonds/:controller/:action/*'*
Here are my problems:
1°) If a call the url:
http://localhost/gf/test/fr/Test/resultat/index/page/2
the right controller and action are called but the generated url to go
to the next page
with the code "$this->url(array('page' => 3));" in my view is:
http://localhost/gf/test/index.php/fr/Test/resultat/index/page/3
which include index.php. I would like the url to not include index.php
and create
http://localhost/gf/test/fr/Test/resultat/index/page/3.
Any idea ?
2°) Also, I dont know how to generate a good url for my css (in the css
directory, see the layout at the beginning). I would like the URL to be:
http://localhost/gf/test/css/mycss.css
the appendStylesheet function does not take into account the baseurl, so
when I use the folowing code in my layout page:
echo $this->headLink()->appendStylesheet('css/my.css');
the css file called from URL
http://localhost/gf/test/fr/Test/resultat/index/page/2 is:
http://localhost/gf/gescomedia/fr/Test/resultat/index/page/css/my.css
I can obviously write "/gf/test/css/my.css", but shouldn't zf manage this ?
Sorry for my poor english, I hope you understood me.
Thanks for reading and I hope you can help me.
Ithier
没有评论:
发表评论