Recently, we helped the customer move the host from Godaddy to Hostgator. The domain name is still on godaddy, but the NameSever (NS) is changed to Hostgator, so that the domain name can be managed in the hostgator background, you do not have to worry about the failure to access the website due to the Host IP address change.
The website was successfully transferr
This section: Details thinkphp URL rules, url pseudo-static, url routing, url rewriting, url generation one, URL rules 1, default is case-sensitive , 2, if we do not want to be case-sensitive can be changed to config fil
PHP short URL Super simple code
System environment:
Php,apache2,linux
To generate the PHP short URL operation:
Copy the code to index.php in a two-level directory with only 1 characters (such as U) as the folder name.
To add write permissions for this directory, the diagram chmod 777 U (root directory also line, in order to avoid affecting other files may have to change the code)
JavaScript implementations:
Top.location.href the address of the top-level windowThis.location.href the address of the current window
PHP Implementation:
Get domain name or host addressecho $_server[' Http_host ']. "”; #localhost
Get web Addressecho $_server[' php_self ']. "”; #/blog/testurl.php
Get URL parametersecho $_server["Query_string"]. "”; #id =5
Get user Agentecho $_server[' Http_referer ']. "”;
Get the full URLEcho ' http://'.
SerV
C # URL short address compression algorithm and short URL Principle example, detailed introduction of the short URL mapping algorithm, the long URL MD5 generated 32-bit signature string, divided into 4 segments, 8 bytes per segment, and then generate a short URL, see text ex
Seo friends now know the importance of URL static, URL pseudo static, and URL rewriting to Seo. Search Engines like static website pages. Today, we will analyze in detail the differences among static URLs, pseudo-static URLs, and URL rewriting.
Static URL. Static
URL rewriting is the process of intercepting incoming Web requests and automatically redirecting requests to other URLs.For example, if the browser sends a request for hostname/101. aspx, the server automatically directs the request to http: // hostname/list. aspx? Id = 101.Url rewriting has the following advantages:Shorten the url and hide the actual path to imp
The following describes how to add url parameters to a url and change the url parameters: javascritpurl
The url parameter method is used to add parameters to the url. If the original url contains the parameters, it will be overwri
Add the url parameter to the url, and then add the parameter to the url.
Add object parameters to the url. If the original url contains parametersJs Code
function addToUrl(obj){ var aprotocol = location.protocol; var ahost = location.host; var apath = location.pathname; var
1 Define a method Get_page (URL), url parameter is the URL that needs to get the content of the webpage, return the content of the webpage. Tips (You can learn about Python's Urllib module)2 Importurllib.request3 4 defget_page (URL):5Response =urllib.request.urlopen (URL)6HT
Get current:var url = window.location.href;Baidu as an example:var url=window.location.href;console.info (URL); http://www.jspp.cn/testbin/apptest/app-site/explore.html;The split () method is used to split a string into an array of strings.First use Split ('? ') To detach a URL from a parameter:var
First, PHP gets the URL of the current page:
Copy the Code code as follows:
Get the current script URLfunction Getcururl (){if (!empty ($_server["Request_uri")){$scriptName = $_server["Request_uri"];$nowurl = $scriptName;}Else{$scriptName = $_server["Php_self"];if (Empty ($_server["query_string"])){$nowurl = $scriptName;}Else{$nowurl = $scriptName. "?". $_server["Query_string"];}}return $nowurl;}
The other is the value of a variable in the query sect
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.