.htaccess重写不适用于图像链接

时间:2018-12-24 19:17:07

标签: html angularjs apache .htaccess angular-ui-router

我希望所有重定向到index.html,文件除外。

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ - [L]
RewriteRule ^ index.html [L]

当我单击以图像结尾的链接时,我希望打开该图像,而不是重定向到index.html。我的图像链接路径是正确的,如果我右键单击并打开链接,则会打开图像。但是,当我单击图像时,页面将重定向到index.html

<a ng-href="{{$ctrl.photo.photo_large}}"><img ng-src="{{$ctrl.photo.photo_normal}}"></a>

0 个答案:

没有答案