doqo89924 2013-05-08 04:50
浏览 53

如何处理自动/编码重定向?

hope all active user on this community are fine..

I m facing a problem and for that I was looking for help..:)

I have a software website and I update those software frequently.

so, for example.. a software name is "example" and version is "1.0". later I have updated to version 1.1 and removed 1.0 from server. but say before I updated it to 1.1 many user have 1.0 link to download

ex:

www.example.com/downloads/example.V1.0.exe

so, as that file is not available anymore so, my user will get confused.

so, I want to redirect all that link to current version

so, I did this: I go to c-panel, the redirect page, then direct that particular exe to current exe file.

but the problem is I have many products and also make updates version for those .. so, it will be very hard to always updated that through c-panel redirects :( and in some case it would be so tough.

for example after some time I have released 50 versions..

like: 1.1,1.2,1.3 .... 9.55

and many user could have any version link, so it will be impossible to use c-panel redirects to all those old version to current version..

so, what I want.. a easier way to redirect those non exiting file to latest file

any suggestion would be highly appreciated

I have this idea:

  1. I will use my own 404.php for 404 error
  2. I will code that 404.php in a way that it will check the referrer url ( I am not sure is that call referrer or what)
  3. I will use csv/text file, my php code will check if the referrer url is in csv/text file, if so, then it will redirect to new file that is in my csv/text file too. and if not then it will redirect to my regular 404.html file or to home page.

is it a good idea?

if so, then I just need a help to get the referrer url. for example which url call my 404.php..

I hope I m clear and I have explained in it detail..

so, I would expect an help ASAP

thanks in advance for any upcoming help best regards

  • 写回答

1条回答 默认 最新

  • douzhanhui5662 2013-05-08 05:22
    关注

    The best thing you could do is have a link called 'latest', which would redirect to your latest version of your executable.

    For example, say I have three releases: v0.0.1 (initial release, not for production), v1.0.0 (production release), and v1.2.0 (hotfix for v1.0.0, production ready). In my website, I would have it laid out like this:

    www.example.com/downloads/releases/example_latest.exe

    This would redirect to:

    www.example.com/downloads/releases/example_v1_2_0.exe

    And then I would have a link to the FTP site holding all of the public releases, which would contain v1.2.0 and v1.0.0:

    www.example.com/downloads/releases/

    and I would have nightly builds hiding at some internal URL that is not available to the public, like www.example.com/downloads/nightly/

    Hope this helps!

    评论

报告相同问题?

悬赏问题

  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值