0
由於某些原因,PyroStreams正在爲url添加額外的斜線。在所有測試過的瀏覽器中,圖像都顯示得很好,但是我的客戶很擔心。我檢查了我的.htaccess,但我看不到會導致這種情況。這也發生在流接口中,這意味着我得到了額外的斜線代碼,我沒有觸及。PyroStreams在'images'之前的圖片名稱中添加了一個額外的斜槓?
此:
<img src="{{ hero:image }}" width="305" alt="">
產生以下:
<img src="http://rococ.co/grandhelo/pyroapp/site/uploads/default/files//ssvs-hero.jpg" width="305" alt="">
這裏有一個很好的度量的.htaccess:
# Multiple Environment config
# Set this to development, staging or production
# SetEnv PYRO_ENV production
<IfModule mod_rewrite.c>
# Make sure directory listing is disabled
Options +FollowSymLinks -Indexes
RewriteEngine on
# NOTICE: If you get a 404 play with combinations of the following commented out lines
#AllowOverride All
#RewriteBase /wherever/pyro/is
# Restrict your site to only one domain
# !important USE ONLY ONE OPTION
# Option 1: To rewrite "www.domain.com -> domain.com" uncomment the following lines.
#RewriteCond %{HTTPS} !=on
#RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
#RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
# Option 2: To rewrite "domain.com -> www.domain.com" uncomment the following lines.
#RewriteCond %{HTTPS} !=on
#RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
#RewriteCond %{HTTP_HOST} (.+)$ [NC]
#RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]
# Remove index.php from URL
RewriteCond %{HTTP:X-Requested-With} !^XMLHttpRequest$
RewriteCond %{THE_REQUEST} ^[^/]*/index\.php [NC]
RewriteRule ^index\.php(.*)$ $1 [R=301,NS,L]
# Keep people out of codeigniter directory and Git/Mercurial data
RedirectMatch 403 ^/(system\/cms\/cache|system\/codeigniter|\.git|\.hg).*$
# Send request via index.php (again, not if its a real file or folder)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
<IfModule mod_php5.c>
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_php5.c>
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
</IfModule>
有誰知道如何制止這種行爲,或有什麼我可以將這種洞察力傳遞給我的客戶解釋這不是一個問題?
它有沒有關係htaccess的,它有與任何代碼生成的圖片src做。有沒有一個配置路徑,當它不應該有一個尾隨斜線? – 2012-07-18 16:32:01
感謝您的快速回復。我沒有設置任何配置路徑,我在哪裏可以找到這個設置? – jayseeg 2012-07-18 16:46:41