重写 Mod 重写
所以,我的主机最近宕机了,我不得不搬到一个新的主机 - 但这意味着我的 htaccess 文件在搬迁过程中丢失了......
现在我必须重写它,但这从一开始就是一个冒险。 ..
我需要做的是编写以下内容...
转...
http://longdomain.com/show.php?id=100
成
http://shortdomain.com/100
因此,当有人访问短网址时,它将加载长网址,而不更改他们所在的实际网址。
这使我的短 URL 服务与帐户和 URL 管理部分分开。
我为此使用了 mod 代理,这样我就可以跨域。
但我对自己是如何做到的感到茫然。
谢谢你们的帮助...
So, my host went down recently and I had to move to a new host - but that means my htaccess file got lost in the move...
And now I've got to rewrite it, but it was a crapshoot to begin with...
What I need to do is write the following...
Turn...
http://longdomain.com/show.php?id=100
into
http://shortdomain.com/100
So when somebody visits the short URL, it'll load the long URL without changing the actual URL they're at.
This keeps my short URL service separate from the account and URL management sections.
I was using mod proxy for this so I could go cross domain.
I'm at a loss as to how I was doing it though.
Thanks for the help guys...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将以下内容添加到
shortdomain
站点根目录中的 .htaccessAdd the following to your .htaccess in the root dir of your
shortdomain
site