We know that rewrite can only be defined to $9 in pseudo-static. If it is over, it will be invalid. In actual use, when there are more than 9 parameters, how can we solve it? See below for decomposition.
RewriteRule backreference, reference method is: $N (0 <= N <= 9) reference the current (with several RewriteRule instructions) RewriteCond matching Pattern component (parentheses) !). RewriteCond backreference, the reference method is: %N (1 <= N <= 9) refers to the grouping component in the last matching condition in the current RewriteCond condition (parentheses!)
Fish is not as good as giving people a fish. Let's demonstrate the process of implementation.
First of all, you have to have an environment, support pseudo-static, and then test. Create a new web folder named 1 and create a php document named: index.php The document code is as follows: <?PHP echo $_GET['a'].'<br>'; echo $_GET[' b'].'<br>'; echo $_GET['c'].'<br>'; echo $_GET['d'].'<br>'; echo $_GET['e' ].'<br>'; echo $_GET['f'].'<br>'; echo $_GET['g'].'<br>'; echo $_GET['h']. '<br>'; echo $_GET['i'].'<br>'; echo $_GET['j'].'<br>'; echo $_GET['k'].'< ;br>'; echo $_GET['l'].'<br>'; echo $_GET['m'].'<br>'; echo $_GET['n'].'<br> ;'; ?> Copy the code This php to implement the url pass parameters, an, 14 parameters, more than 9
Then write the .htaccess file RewriteEngine On RewriteRule ^a (.*) b (. *)c(.*)d(.*)e(.*)f(.*)g(.*)h(.*)$ $8&a=$1&b=$2&c=$3& ;d=$4&e=$5&f=$6&g=$7 [C,NC] RewriteRule ^(.*)i(.*)j(.*)k(.*)l(.*) m(.*)n(.*)$ index.php?$8&h=$1&i=$2&j=$3&k=$4&l=$5&m=$6&n= $7 [QSA,L,NC]
RewriteRule ^index-(.*?)-(.*?)-(.*?)-(.*?)-(.*?)- (.*?)-(.*?)-(.*?)-(.*?).html$ $9&a=$1&b=$2&c=$3&d=$4&e =$5&f=$6&g=$7&h=$8 [C,NC] RewriteRule ^(.*?)-(.*?)-(.*?)-(.*?)-(. *?)-(.*?)$ index.php?$7&i=$1&j=$2&k=$3&l=$4&m=$5&n=$6 [QSA,L, NC] Copy the code Here I wrote two ways to make it easy for everyone to use
1.http://127.0.0.1/1/a1b2c3d4e5f6g7h8i9j10k11l12m13n14 2. http://127.0.0.1/1/index- 1-2-3-4-5-6-7-8-9-10-11-12-13-14.html
If you run the above address, a number of 1-14 will appear, indicating you The configuration was successful
Building cloud-based data and application servers typically requires creating a remote connection to
Security dog service cloud is a server security management cloud platform, it has a lot of useful
In 2006, the most popular Chinese domain name on the Internet except the World Cup
In the beginning, I wanted to disable the URL of the php suffix directly from bei
Mail server related knowledge popularization Transmission principle introduction
What is the reason for the Directory Listing Denied to appear on the website?
Linux server backup: VPS backup script
Should Windows backup be migrated to the cloud platform?
Secret: How is the Windows server attacked
Web server maintenance and security management skills 3
The network operator's five misunderstandings in the log analysis
RAID technology key knowledge and RAID features
MDT 2010 combat: lightweight contact deployment Win2003
Graphical installation of IIS7 in Vista and configuration of ASP environment
Through the hippocampus Apple Assistant AppleID for in-app purchase
People who criticize Windows 8 have "lost their minds"
How to create WiFi hotspot under Win8: Win8 create WIFI hotspot detailed tutorial
WP8.1 Personal Intelligence and Voice Assistant Cortana screenshot
Windows 8 can't use the perfect solution of CCB online banking shield (2)
Win8.1 update patch prompts 8024402F error reason and solution
Win7 switch input method when the display box is missing how to get back
Three Ways to Speed Up Adding and Removing Programs Experience Tips
How to change the win10 system search button into the search bar