我想在访问图片时在后台打开网站。
即。假设我在浏览器中输入http://websiteloadinginthebackground.freeptp.com/images/free.jpg,那么图像应该弹出,网站应该在后台加载。就像早期的谷歌图片布局一样。
有没有办法这样做?
答案 0 :(得分:0)
你可以使用Apache mod rewrite做这样的事情。您可以将URL重写为:
http://websiteloadinginthebackground.freeptp.com?image=free.jpg
您的页面将加载,脚本可以从URI中读取图像参数,将其加载到加载页面顶部的灯箱或其他显示中。
您可以在此处了解有关更改网址的详情:http://httpd.apache.org/docs/2.0/misc/rewriteguide.html