更改网址而不实际更改它。 [英] Change url without actually changing it.

查看:46
本文介绍了更改网址而不实际更改它。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法可以获得


http://somesite.com/viewer/someimage.jpg


被认可作为


http://somesite.com/viewer/?id=someimage.jpg


我知道我可以重写网址。 htaccess但我不想改变网址中的字母。


我试图获得的东西是;

myspace如何做:myspace .com /用户名

但''用户名''不是真正的目录。

我猜它被读作myspace.com/?user =用户名


嗯,有人吗?


谢谢。

Is there a way i could get

http://somesite.com/viewer/someimage.jpg

to be recognised as

http://somesite.com/viewer/?id=someimage.jpg

I know i could rewrite the url with .htaccess but i don''t want to change the lettering in the url.

The thing im trying to get at is;
how myspace do: myspace.com/username
but the ''username'' isn''t an actual directory.
I''m guesing it is read as myspace.com/?user=username

Hmm, anyone?

Thanks.

推荐答案

你好Markus。


根据我对MySpace的简短经验,我完全可以相信他们实际上为每个用户创建了一个带有动态创建的索引文件的目录。

除了UrlRewrite之外,我不知道你怎么能做你想要的。


我很感兴趣看看是否有人有解决方案。
Hi Markus.

Based on my brief experience with MySpace, I could very well believe that they actually create a directory for each user with a dynamically created index file.

Other than the UrlRewrite thing, I''m not sure how you could do what you are asking.

I''m very interested in seeing if anybody has a solution to this.


正在寻找正常的mod重写规则。只要你没有在规则中指定R标志,用户就不会意识到发生的任何事情。


例如这样的东西会起作用: -
A normal mod rewrite rule is what you are looking for. As long as you do not specify the R flag in the rule the user will be unaware of anything happening.

For example something like this will work:-

展开 | 选择 | Wrap | 行号



您正在寻找正常的mod重写规则。只要你没有在规则中指定R标志,用户就不会意识到发生的任何事情。


例如这样的东西会起作用: -
展开 | 选择 | Wrap | 行号


这篇关于更改网址而不实际更改它。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆