A question about converting ApacheRewrite from FPM to FastCGI

Source: Internet
Author: User
The purpose is to display a Url such as test. comfrontindex in the mobile phone version as test. commfrontindex. the actual link should be test. comfrontindex? Modem: & amp; lt; IfModu... the Rewrite in the Test environment is written in the following way:
Display as http://test.com/m/front/index on phone
The actual link should be http://test.com/front/index? Mode = m

Now, the Rewrite in the Test environment is written as follows:

Options + FollowSymlinks
RewriteEngine On

RewriteCond % {REQUEST_FILENAME }! -D
RewriteCond % {REQUEST_FILENAME }! -F
RewriteRule ^ m /? (.*)/? $ Index. php/$1 /? Mode = m [QSA, PT, L]

RewriteCond % {REQUEST_FILENAME }! -D
RewriteCond % {REQUEST_FILENAME }! -F
RewriteRule ^ (. *) $ index. php/$1 [QSA, PT, L]

Everything can be accessed normally, but a problem occurs on the server.

The local test environment is XAMPP (FPM), and Apache FastCGI is used on the server.
I would like to ask how to Rewrite the Rewrite rule for normal parsing. thank you?

Reply content:

The purpose is to set the URL of the PC version http://test.com/front/index.
Display as http://test.com/m/front/index on phone
The actual link should be http://test.com/front/index? Mode = m

Now, the Rewrite in the Test environment is written as follows:

Options + FollowSymlinks
RewriteEngine On

RewriteCond % {REQUEST_FILENAME }! -D
RewriteCond % {REQUEST_FILENAME }! -F
RewriteRule ^ m /? (.*)/? $ Index. php/$1 /? Mode = m [QSA, PT, L]

RewriteCond % {REQUEST_FILENAME }! -D
RewriteCond % {REQUEST_FILENAME }! -F
RewriteRule ^ (. *) $ index. php/$1 [QSA, PT, L]

Everything can be accessed normally, but a problem occurs on the server.

The local test environment is XAMPP (FPM), and Apache FastCGI is used on the server.
I would like to ask how to Rewrite the Rewrite rule for normal parsing. thank you?

Related Article

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.