Apacherewrite_module usage tutorial

Source: Internet
Author: User
Apacherewrite_module
[Url] http://wwww.aaaaaaaaa.com/bbb.php? Id = 888 [/url]
The address format is changed
[Url] http://wwww.aaaaaaaaa.com/888.htm#/url]
Or
[Url] http://wwww.aaaaaaaaa.com/yourname/888.htm#/url]
Of course you can change it as needed.
The MOD_rewrite module of APACHE.
You can see a demo of a PHP Learning Forum.
[Url] http://www.phpx.com/happy/#/url]
The layout and posts of this forum use this technology. static addresses are fake.
Where is this technology good?
It can make baidu, google, and so on revenue to all pages of your site.
The revenue address is your fake static address. of course others don't know that you are fake, and this technology hides the program running behind you.
You can
/Soft/1234.html rewrite to soft. php? Id = 1234
Of course, change the name to softxfewafew. php? Id = 1234
The surface is still soft/1234.html, but you have executed the file you have rewritten in APACHE.
It can fundamentally prevent others from intruding into the program itself.

How can I rewrite the data below? WINDOWS and LIUNX2
All operations
Httpd. CONF in the conf folder of the APACHE installation folder
After opening, find
# LoadModule rewrite_module "modules/mod_rewrite.so"
Remove.
Then find the VM configuration
Add to VM
RewriteEngine On
RewriteRule ^/soft/(%0-9%%%%%.html $/soft. php? Id = $1
// Explanation
// WWW. Corn. COM/SOFT/1234. HTML
// Rewrite
// WWW. Corn. COM/soft. php? Id = 1234
// Here the ID can be changed. if you give it 1, it is passed 1.
RewriteRule ^/(%0-9%%%%%.html $/soft. php? Id = $1
// Explanation
// WWW. Corn. COM/1234. HTML
// Rewrite
// WWW. Corn. COM/soft. php? Id = 1234
RewriteRule ^/(%0-9%%%%%_(%0-9%%%%%.html $/soft. php? Id = $1 & catid = $2
// Explanation
// WWW. Corn. COM/1234_2222.HTML
// Rewrite
// WWW. Corn. COM/soft. php? Id = 1234 & catid = 2222
Of course, you can change it as you like!
This is under WIN.
LIUNX is the same, but it must be added.
Start
End
Rewrite is added to the VM settings.
If there is no VM, add it to the end!

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.