Why is URLrewrite wrong?

Source: Internet
Author: User
Why is URLrewrite wrong?
RewriteEngine On
RewriteBase/forum
RewriteRule ^ (Index | List | Content | admin | Vote | Message | Favor). *) $ index. php/$1


Prompt
Not Found

The requested URL/forum/List-index-f-2.shtml was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

But I write
RewriteRule 1.php 2.php is correct and confusing


Reply to discussion (solution)

Check whether the RewriteBase path is correct.

Check whether the RewriteBase path is correct.
Its server is Apache 2.2.23 + Nginx1.0.15
Url rewriting is not very friendly for regular expressions.
The http://www.52host.net/shared-hosting I bought here
I bought 68 RMB

Why RewriteBase/forum
The meaning of forum in RewriteBase/forum

Why RewriteBase/forum
The meaning of forum in RewriteBase/forum

Forum is the name of a folder in the root directory.

Why RewriteBase/forum
The meaning of forum in RewriteBase/forum
Moderator boss, follow me and I will send you a private email

Then you are wrong!
The RewriteBase command is used to declare an alias so that the url can be replaced with the actual path when the url is reconstructed.
Of course, you still need the alias command.

If your forum actually exists, it is not an alias.
Therefore, you need to put the. htaccess file in the forum directory.

 
  RewriteEngine OnRewriteRule ^((Index|List|Content|admin|Vote|Message|Favor).*)$ index.php/$1
 

Then you are wrong!
The RewriteBase command is used to declare an alias so that the url can be replaced with the actual path when the url is reconstructed.
Of course, you still need the alias command.

If your forum actually exists, it is not an alias.
So you need to put the. htaccess file in the forum directory Plain Text code? 1234 RewriteEngine O ......

I tried it. no ~~

I can do it. you can't do it. I can't do anything about it.

If your supplier does not allow you to put. htaccess in the subdirectory
You can also consider prefixing the rule with forum/

I can do it. you can't do it. I can't do anything about it.

If your supplier does not allow you to put. htaccess in the subdirectory
You can also consider prefixing the rule with forum/

You cannot send your private email. I will send you the ftp information. you can check it out.

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.