What should I do with url redirection?

Source: Internet
Author: User
Url testyear2006action_add.html how to redirect the above url to the following test. php file & gt; test. php? How to change year2006 & amp; action_add & nbsp;. htaccess # enable RewriteEngine mode & nbsp; url redirection
Test/year/2006/action/_add.html how to redirect the above url to the following test. php file
>>>
Test. php? Year = 2006 & action = _ add


How to change. htaccess
# Enable RewriteEngine mode
RewriteEngine On

# Do not modify Rewrite system rules
RewriteRule ^ archiver/(fid | tid)-[0-9] + \. html) $ archiver/index. php? $1
RewriteRule ^ forum-([0-9] +)-([0-9] +) \. html $ forumdisplay. php? Fid = $1 & page = $2
RewriteRule ^ thread-([0-9] +)-([0-9] +)-([0-9] +) \. html $ viewthread. php? Tid = $1 & extra = page \ % 3D $3 & page = $2
RewriteRule ^ space-(username | uid)-(. +) \. html $ space. php? $1 = $2
RewriteRule ^ tag-(. +) \. html $ tag. php? Name = $1
RewriteRule ^ k/(. *)/(. * example .html $/article. php? Tid = $2 & dtime = $1
ErrorDocument 404/errors/notfound.html


------ Solution --------------------
RewriteRule ^ test/year/([0-9] +)/action/([a-z \-] +) \. html $ test. php? Year = $1 & action = $2

There is no test. you can choose not

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.