middleware can be constrained to the routing request, for the daily development is very useful, such as doing auth verification, can be directly through the middleware to do the isolation:
Laravel
Route::middleware(['auth'])->group(function () { Route::get('user/profile', function () { // 使用 auth 中间件 });});
Iris
authentication := basicauth.New(authConfig)needAuth := app.Party("/user", authentication){ needAuth.Get("/profile", h)}
Sub-domain Routing
In Laravel, a routing group ca
/xxx)
URL: page URL, priority URL > Endpoint > class name
Path to the Static_folder:static directory
URL of the Static_url_path:static directory
Anotheradmin.html:
{% extends ' admin/master.html '%} {% block body%} Hello World from anothermyadmin! Click me to go to test view{% endblock%}
If Anotheradminview adds the parameter endpoint= ' xxx ', then this can be written url_for (' Xxx.text '), then the page URL will be/admin/anotheradminview/into/admin/xxxIf the parameter url= ' AAA ' is spe
. For example, the final cn in www.online.ha.cn is a top-level domain name, which is divided into different levels from the back to the front.
There are two top-level domain names on the Internet, one is Country Code such as cn, the other is Classification Code such as edu, org, net, com. Subdomain names under country top-level domains can also be classified by region or organizational structure.
To resolve the domain name, you need to search for th
Configure the server -- Nginx add multiple second-level subdomains and nginx subdomainsNginx multi-file configuration second-level subdomain name (recommended)
First, add resolution in your domain name console. Here we use adding a blog prefix as an example.
I use hichinaResolution settingsMediumAdd resolution
Host records: The second-level domain name you want Record Value: Your IP address
After the sub-domain name is saved, the first step is to
Article Title: DNS configuration example. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
DNS Server configuration example:
Note: The above example file is only used for demonstration. It is different from the actual content and may differ from the actual test. For basic DNS knowledge, see the PowerPoint slide file prepared by myself. The URL is the same a
name
Ip, _ := net.LookupIP("www.baidu.com")
fmt.Println(ip) //[111.13.100.92 111.13.100.91], find the ip address of the given domain name, you can find it by nslookup www.baidu.com.
}
Before explaining the following function usage, describe several noun meanings (refer to the following connection: http://blog.sina.com.cn/s/blog_7ff492150101kqbh.html):
Domain name resolution record A, CNAME, MX, NS, TXT, AAAA, SRV, explicit url, implicit URL meaning
1. A record (IP point): reso
required Ngrok software from this man's website (http://www.tunnel.mobi/), Windows, Linux, Mac platforms have OH. My is the Windows environment, download after decompression is a ngrok.exe file. Then, you need a configuration file, as well as a download, and a ngork.cfg file after the download.second, the operation of servicesAfter downloading the two files, we can easily find a directory to put it on the line, for example, I put on the D-Drive, so it is OK: Then, open the CMD terminal, enter t
some checks (such as the expiration date and Path). If it has not expired, then read and retrieve its value, restore the user information, and set the thread. currentprincipal. identity. set the property value of name to the restored user name, and check whether the user has the permission to access the page of the current request. If so, the execution result of the page is returned to the user's browser.
The process is simple, right? Validation principles of multiple sites in the same domain
Public services, similar to ngrok.com, I also experimented.Write a ngrok.cfg that reads as follows:SERVER_ADDR: "tunnel.mobi:44433"Trust_host_root_certs:trueExecute the following command with Ngrok latest client version 1.7:$ngrok-subdomain Tonybaiexample-config=ngrok.cfg 80A tunnel can be successfully established for this machine to externally provide "tonybaiexample.tunnel.mobi" services.Tunnel Status OnlineVersion 1.7/1.7Forwarding Http://tonybaie
Now that the Office 365 management has a certain foundation, the next priority is to name the right, the so-called "bad names, words are not smooth." When you subscribe to Office 365, you need to create a subscription ID, which is the default administrator's account. When you create this subscription ID, you specify a domain name suffix that is based on a subdomain of the same Office 365 user domain. The form is as follows:[Email protected] remind you
The host 91cPanel provides Discuz! One-click installation, professional support for Discuz to build a forum system, you only need to choose to install Discuz in the control panel !, Enter your forum name and set the password to automatically install the forum, saving you the trouble of deploying the forum. The following describes the procedure and operations for one-click installation. 1. click "site software" in the "2. then enter the next host 91cPanel to provide Discuz! One-click installation
page). This time, the browser will send the verification cookie (there are other cookies written in the previous Domain Name) becauseThe cookie has been verified.
Similarly, asp.net searches for the authentication cookie in the request header. This time, he can find the cookie. Then, it checks the cookie attributes (timeout time, path, etc.). If no timeout occurs, it reads the cookie value,Obtain the user information in the cookie, and then set the user Name to the Thread. CurrentPrincipal. Ide
Lab environment: Three DNS servers, one serving as the primary server and the other serving as a subdomain. The RHEL 5.4 system is installed on the three servers, and the test is successful. Note: The primary dns address is 192.168.1.1, the secondary dns address is 192.168.1.2, And the subdomain dns address is 192.168.1.3. The dns domain name is feng.com and the subdoma
-E Perform a search for possible email addresses
-P Perform a TCP port scan on a host
*-F Perform a TCP port scan on a host showing output reporting filtered ports
*-B Read in the banner converted ed from the scanned port
*-T 0-9 Set the TTL in seconds when scanning a TCP port (Default 2)
* Requires the-p flagged to be passed
The preceding information shows the syntax format and all available parameters of the dmitry command. The following uses the-s option of the dmitry command to query
Document directory
2. Use the CSS genie to reduce HTTP requests
3. Load CSS first and then load Javascript
4. Concurrent downloading with subdomain names
5. Adding an Expires header
Loading webpages as quickly as possible is very important to websites. users want to quickly view the pages they want to see. If you cannot satisfy them, they will find another one. In this article, you will see five simple and effective technologies for your web p
I discussed this topic with several friends yesterday and found that although single sign-on or independent passport logon has many implementation methods, however, there are not many people who can really understand and implement it. Therefore, I hope you can understand more about it in terms of principle and implementation.
For example, if you log on to MSN Messenger, you do not need to log on to Hotmail.Generally, single-point logon requires an independent logon site, which generally has an
MySQL query consumes CPU time, help me to see how to optimize this MySQL structure
$SQLL = "Select * from ' shops ' WHERE ' subdomain '! = ' ORDER by RAND () LIMIT 15";
Only use this query, to subdomain query, this MySQL CPU time is very high, Sina app This wants money, do not know how to optimize can reduce MySQL CPU time, is to build an index what? What should I do? And what's the primary key? Can you
JavaScript cross-domain: Url Description Whether to allow communication Http://www.a.com/a.jsHttp://www.a.com/b.js Under the same domain name Allow Http://www.a.com/lab/a.jsHttp://www.a.com/script/b.js Different folders under the same domain name Allow Http://www.a.com:8000/a.jsHttp://www.a.com/b.js Same domain name, different ports Not allowed Http://www.a.com/a.jsHttps://www.a.com/b.js Same domain name, different protocols Not allowed Http://www.a.com/a.jsHttp://70.32.92.74/b.js Domain and dom
Foreign free 30g Super large capacity PHP tutorial MySQL tutorial space application
Fee 5g/30g/php/mysql/ftp/subdomain/domain/no Ads Space
High space-5 GB Space-GB Bandwidth-5 MySQL, subdomain, emails-100% free! No advertisements!
High bandwidth (Details: http://www.zzsky.cn/free/content/900.htm)::-MB Space-GB Bandwidth-Unlimited features (email, MySQL, addon/parked domains)-100% free! No advertisements!
matching system. This means that you can use placeholder matching domain names in your domain.
Yaml
Projects_homepage:
path: /
Host: "{project_name}.example.com"
defaults: {_controller: AcmeDemoBundle:Main:mobileHomepage}
Homepage:
path: /
defaults: {_controller:acmedemobundle : Main:homepage}
Xml
Php
Use symfony\component\routing\routecollection;
Use Symfony\component\routing\route;
$collection = new RouteCollection ();
$collection->add (' Project_
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.