htaccess文件重定向我的网页,如
site / pageTitle to index.php?id = pt
并显示来自类别的文章 site / article / pageTitle
现在.htaccess文件将我的图片文件夹视为catgory目录,将图像视为pageTitle并且不显示图像 即使我直接将图片显示在图片上,也会显示文章页面
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#show urls like site/author/pageno
RewriteRule ^author/(.*)/(.*)$ index.php?author=$1&page=$2 [NC]
RewriteRule ^author/(.*)?$ index.php?author=$1&page=$2 [NC]
#show articles like site/article/articleTagName
RewriteRule ^article/(.*)/(.*)?$ index.php?article=$1 [NC]
RewriteRule ^article/(.*)?$ index.php?article=$1 [NC]
#direst article site/articleTagName
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?article=$1 [L,QSA]
#set image folder and user folder to real from virtual
RewriteRule ^(.*)/images/$ /images/
答案 0 :(得分:1)
请用
替换你的最后一行RewriteRule ^(.*)/images/(.*)$ images/$2
我遇到了同样的问题,但是我从你的编码中得到了一些提示并且稍微改变了代码;现在它工作正常。