doutan2111 2014-01-21 08:12
浏览 31
已采纳

htaccess和img路径

When i use the following htaccess all is ok with my links

Options +FollowSymlinks
RewriteEngine On

RewriteRule ^auteur\.html$    auteur.php    [L]
RewriteRule ^references\.html$   references.php [L]
RewriteRule ^contact\.html$  contact.php [L]
RewriteRule ^site/actualite\.html$  /site/actualite.php [L]
RewriteRule ^site/actualiteDetail/([0-9]+)/([0-9a-zA-Z_-]+)\.html$  /site/actualiteDetail.php?id=$1&titre=$2    [L]

The only problem is with pictures when i'm on the page mysite.com/site/actualiteDetail/17/titre.html for exemple. The path of my img is :www.mysite.com/pub/img/img.png

How to correct this ? thanks !

  • 写回答

2条回答 默认 最新

  • dtdr84101 2014-01-21 08:16
    关注

    Use a slash('/') in front of the path. This is a common .htaccess problem.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?