我想使用htaccess
重定向Urls例如,这是原始网址localhost/stories.php
,我希望它是localhost/stories
和localhost/story1.php
到localhost/stories/story1
..等
我已经做到了,但图像和样式不起作用,因为css,img,js
文件夹不在正确的位置。
考虑到css , img
有子文件夹
RewriteEngine on
RewriteRule ^stories$ stories.php [L]
RewriteRule ^stories/story1$ story1.php [L]
RewriteRule ^stories/story2$ story2.php [L]