URL rewriting is not very clear, always error

Source: Internet
Author: User
URL rewriting is not very clear, always error
I have added a new alias with Apache, the newly generated URL is http://localhost/gyjw/
Input http://localhost/gyjw/will automatically jump to http://localhost/gyjw/index.php
http://localhost/gyjw/index.php This is my website landing page, landing after the jump to http://localhost/gyjw/main.php
Now I want to rewrite the two addresses of http://localhost/gyjw/index.php and http://localhost/gyjw/main.php.
Change to http://localhost/index.php and http://localhost/main/?id=101, respectively.
I would like to modify the. htaccess this file to rewrite the URL, but Rewritecond and rewriterule these two get a half-day also not fix, always jump out of error page 500, or do not understand Ah!
Is there a great God who can help me achieve it? URL . htaccess Apache

Share to:


------Solution--------------------
Reference:
Maybe I didn't make it clear. htaccess I have finished rewriting, now I want to use include to call a rewritten address of the file check.php hide its real address, his rewritten address is Index.html?fun =000, but direct include ("index.html?fun=000"); I can't get to Google without turning on steam.


The include is called directly, and index.html?fun=000 is turned to check.php after Apache
If you include the full URL, for example http://localhost/index.html?fun=000 estimate is normal, if your include can refer to the URL
  • 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.