Appache Rewriterule Related issues

Source: Internet
Author: User
Appache rewriterule Problems
I want to enter http://web/cms/user_detail/74/41245/in the Address bar.
Then redirect it to http://web/cms/user_detail.php?id=74&contents_id=41245
But Rewriterule didn't work. 404 error

Not Found
The requested Url/cms/user_detail/74/41254/was not found on this server.

What is this for?

Httpd.conf the related configuration is as follows, what is missing the configuration?


---------------------------------------



LoadModule Rewrite_module modules/mod_rewrite.so


Options FollowSymLinks
AllowOverride All
Order Deny,allow
Deny from all



Options Indexes FollowSymLinks
AllowOverride All
Order Allow,deny
Allow from all




ServerAdmin [email protected]
DocumentRoot D:\webroot
DirectoryIndex index.html index.htm index.php
ServerName Web
Rewriteengine on
Rewritecond%{request_uri} ^/user_detail/([0-9]+)/([0-9]+]/?$
Rewriterule ^ (. *) $/user_detail.php?id=%1&contents_id=%2


------Solution--------------------
Did not find the page, you are not using the frame, if so look at the route regular match
------Solution--------------------
First, locate your website root directory as a CMS, or do not use the. conf file in the CMS folder. htaccess

Then try this again (delete your original cond and rule):
XML Code
rewriterule/user_detail/([0-9]+)/([0-9]+) $/user_detail.php?id=%1&contents_id=%2 [QSA,L]
  • 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.