将css和img目录重定向到子文件夹

时间:2015-01-15 14:12:38

标签: php .htaccess

我想使用htaccess

重定向Urls

例如,这是原始网址localhost/stories.php,我希望它是localhost/storieslocalhost/story1.phplocalhost/stories/story1 ..等 我已经做到了,但图像和样式不起作用,因为css,img,js文件夹不在正确的位置。 考虑到css , img有子文件夹

,我该怎么做才能重定向css和img文件夹
RewriteEngine on
RewriteRule ^stories$ stories.php [L]
RewriteRule ^stories/story1$ story1.php [L]
RewriteRule ^stories/story2$ story2.php [L]

0 个答案:

没有答案
相关问题