开发者

Dynamically creating URLs for other websites

开发者 https://www.devze.com 2023-01-07 08:27 出处:网络
I\'d like to know how websites have created URLs with other domains like these on trafficestimate.com.

I'd like to know how websites have created URLs with other domains like these on trafficestimate.com.

I'm guessing it's some .htaccess stuff to redirect dom开发者_如何学Goain names to a dynamic page?

Thanks


Your URL has an GET Request. So when someone calls the page http://google.com/search with the parameters hl=en, safe=off etc., the page can process those parameters. So for instance safe=off means that you want to get back any search result. The q=site:... is your search string. In this case Google will look it up in its database and give you the results. So when you call this URL there is probably no .htaccess processing done. However you can process the URL and GET request with .htacces and i.e. redirect the user to another page.

Maybe you'll describe a bit further what exactly you trying to do/want to know. This makes explaining easier.

EDIT: After reading Gumbo's comment I looked at the Google result page. So maybe your question means the trafficestimate-URLs. They look like http://trafficestimate.com/example.org. This is really a good case for .htaccess. So using .htaccess they take the URL and redirect it to http://www.trafficestimate.com/websites/?domain=example.org. Here you have again a GET request and an application builds the page.


Some URL rewriting is probably involved. Otherwise they would have to create an existing file for every possible request.

Using Apache’s mod_rewrite in a .htaccess file is one option. But since the server identifies itself with “Microsoft-IIS/7.5”, they are probably rather using ISAPI_Rewrite, a mod_rewrite derivative for Microsoft’s IIS.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号