【发布时间】:2012-03-18 19:33:40
【问题描述】:
早上好, 我正在构建自己的 php 框架。我希望所有请求都传递给 index.php 文件,但对 js css jpeg、jpg、png 文件的请求除外。所以我希望一个独立于其他人的模块有自己的资产文件夹,其中包含 css 图像和 js 文件。
结构类似:
application
module1
models
controllers
templates
assets
css
images
test.jpg
hello.png
js
view1.html.php
view2.html.php
module2
models
controllers
templates
assets
css
images
test.jpg
hello.png
js
view1.html.php
view2.html.php
core
here is core file framework
index.php
我该怎么做?
更新
我的模块在应用程序文件夹下。 assets 文件夹必须是公共的。 我想要一个简单的小网址,例如 www.example.com/module1/images/test.jpg
而不是长
www.example.com/application/module1/templates/assets/images/test.jpg
【问题讨论】:
标签: php apache .htaccess url-rewriting