维基百科的伎俩 [英] Wikipedia's tricks

查看:86
本文介绍了维基百科的伎俩的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当你去http://en.wikipedia.org/wiki/j43i03j9f304j9f3049j时,它实际上搜索了j43i03j9f304j9f3049j。这是如何实现的?它有点重定向到名称最匹配/ blahblahblah的页面。这有意义吗?

解决方案


当你去






我真的不能肯定但是它可能是某种查询字符串,如处理。查看URL完成后是否有任何内容(最终/),然后将其加载到SQL语句中以查询数据库。


这是猜测。你为什么想知道?你需要做类似的事吗?


干杯

nathj



当你去http://en.wikipedia.org/wiki/j43i03j9f304j9f3049j时,它实际上搜索了j43i03j9f304j9f3049j。这是如何实现的?它有点重定向到名称最匹配/ blahblahblah的页面。那有意义吗?



这样做的方法是通过Apache的mod_rewrite模块。这允许在收到URL请求时即时重写URL请求。在幕后可能有一个名为search.php的文件,并且http://en.wikipedia.org/wiki/j43i03j9f304j9f3049j被重写为http://en.wikipedia.org/search.php?q=j43i03j9f304j9f3049j


啊,好的。基本上我想做的就是freedomain.co.nr所做的事情,除了我自己的域名。它们会为您提供子域名,例如mydomain.co.nr。然后当你去那个网址时,它会显示一个框架,用于加载你将freedomain指向freedomain.co.nr控制面板的网站。唯一的缺点是,你必须使用他们的.co.nr子域名。我想用我自己的域做这件事,因为我正在使用阻塞的端口80托管自己。我已经使用了index.html文件。我在免费主机上托管实际域,而在index.html上它只加载一个帧,源自ServerIP:8080。因此,如果我转到mydomain.com,框架将加载index.html,其中框架来自serverip:8080。但如果我要去mydomain.com/subdirectory,我需要在serverip:8080 /子目录中找到该帧。这是一个非常令人困惑的解释,但这就是我需要的。


When you go to http://en.wikipedia.org/wiki/j43i03j9f304j9f3049j, it actually performs a search for "j43i03j9f304j9f3049j". How is that achieved? It sort of redirects to the page whose name best matches the /blahblahblah. Does that make sense?

解决方案

When you go to http://en.wikipedia.org/wiki/j43i03j9f304j9f3049j, it actually performs a search for "j43i03j9f304j9f3049j". How is that achieved? It sort of redirects to the page whose name best matches the /blahblahblah. Does that make sense?

Hi,

I really can''t say for certain but it could be some sort of query string like processing. See if there is anything after the URL finishes (final /)and then load that into a SQL statement to query the database.

That''s a guess. Why do you want to know? Do you need to do something similar?

Cheers
nathj


When you go to http://en.wikipedia.org/wiki/j43i03j9f304j9f3049j, it actually performs a search for "j43i03j9f304j9f3049j". How is that achieved? It sort of redirects to the page whose name best matches the /blahblahblah. Does that make sense?

The way this is done is through Apache''s mod_rewrite module. This allows URL requests to be rewritten on the fly, as they are received. Behind the scenes there is likely a file called search.php, and http://en.wikipedia.org/wiki/j43i03j9f304j9f3049j gets rewritten as http://en.wikipedia.org/search.php?q=j43i03j9f304j9f3049j


Ahh, okay. Basically what I want to do is what freedomain.co.nr does, except with my own domain. They give you a subdomain, such as mydomain.co.nr. Then when you go that url, it displays a frame that loads the site you point the freedomain to at the freedomain.co.nr control panel. Only downside is, you have to use their .co.nr subdomains. I want to do it with my own domain, since I''m hosting myself with a blocked port 80. I''ve gotten it to work with the index.html file. I host the actual domain on a free host, and on the index.html it just loads a single frame, sourced at ServerIP:8080. So if I go to mydomain.com, the frame loads index.html, where the frame is sourced at serverip:8080. But if I were to go to mydomain.com/subdirectory, I''d need the frame to be sourced at serverip:8080/subdirectory. It''s a very confusing explanation, but that''s what I need.


这篇关于维基百科的伎俩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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