0
我想顯示上傳的圖片和視頻的短網址users.if用戶下載圖片,他們沒有得到的照片和videos.users的實際路徑無法知道圖片和視頻的實際位置。請讓我知道我如何在wordpress中做到這一點?這可能在htaccess文件中?短上傳的圖片和視頻網址在wordpress
例如, http://example.com/images/pic.jpg
我想要。
我想顯示上傳的圖片和視頻的短網址users.if用戶下載圖片,他們沒有得到的照片和videos.users的實際路徑無法知道圖片和視頻的實際位置。請讓我知道我如何在wordpress中做到這一點?這可能在htaccess文件中?短上傳的圖片和視頻網址在wordpress
例如, http://example.com/images/pic.jpg
我想要。
您必須只露出短網址。所有這些圖像的鏈接,但看起來像http://example.com/pic.jpg
表格。
您可以在內部通過檢查,如果存在這樣一個文件,然後在內部的瀏覽器重寫,因此URL重寫http://example.com/pic.jpg
到/images/pic.jpg
仍然http://example.com/pic.jpg
但他們從/images/pic.jpg
服務的形象:
RewriteEngine On
# check that it's an image
RewriteCond %{REQUEST_URI} \.(jpe?g|png|gif|bmp)$ [NC]
# check that the resource actually exists in the /images/ directory
RewriteCond %{DOCUMENT_ROOT}/images%{REQUEST_URI} -f
# internally rewrite:
RewriteRule^/images%{REQUEST_URI} [L]
你的目標是什麼,爲什麼你需要它? –
我想隱藏來源的確切位置 –