Continue for help. how can I remove index. php from URL rewriting? It's not as easy as you think.

Source: Internet
Author: User
Continue for help. how can I remove index. php from URL rewriting? It's not as easy as you think. IP (FTP): 175.102.3.231
User Name: youyaxli
Password: 1r6wMki13Y
Error link: http://www.youyax.com/forum/List-index-f-4.shtml
Correct connection: http://www.youyax.com/forum/index.php/List-index-f-4.shtml
Objective: to overwrite the address bar and remove index. php
Operation method: Edit the. htacess file in the root directory.
Server: Linux host Apache 2.2.23 + Nginx1.0.15
Can refer to: https://wvw.52host.net/knowledgebase.php? Action = displayarticle & id = 176
For more information about httpd. ini, see:
RewriteRule ^/forum/((Index|List|Content|admin|Vote|Message|Favor).*)$ /forum/index\.php/$1 [L]


Do not modify the files.



Reply to discussion (solution)

The suggestion is only to rewrite the URL at the end of .html. this will solve the problem more. The premise is that your website supports pseudo-static

Can you see it?

Not sure. please restore it to its original state! The homepage cannot be accessed.

Recovered

Public_html/forum/. htaccess cannot be opened

General statement
# Directly access the directory without RewriteRule if the directory exists
RewriteCond % {REQUEST_FILENAME }! -D
# If the file exists, access the file directly without RewriteRule. (if the file does not exist or the file does not exist, rewrite it)
RewriteCond % {REQUEST_FILENAME }! -F
# All files that cannot find the actual path should be handed over to index. php for processing.
RewriteRule ^ (. *) $ index. php/$1 [QSA, PT, L]

Public_html/forum/. htaccess cannot be opened
Will he be the boss of bamboo? What is it that cannot be opened?


No, you will

General statement
# Directly access the directory without RewriteRule if the directory exists
RewriteCond % {REQUEST_FILENAME }! -D
# If the file exists, access the file directly without RewriteRule. (if the file does not exist or the file does not exist, rewrite it)
RewriteCond % {REQUEST_FILENAME }! -F
# All files that cannot find the actual path should be handed over to index .......
I 've tried a lot, but I can't do it. its url is rewritten, and the following part seems to be a real file.

No, you will
The. htacess file is deleted because it does not exist in the directory, so an error occurs.

Well, you can.
As you can see, this is deleted. Get it by yourself

I saw a test directory under your forum directory, where. htacess and index. php

Browse http://www.youyax.com/forum/test/a/ B /c
Get
Array
(
.....
[REDIRECT_URL] =>/forum/test/a/B/c
....
[REQUEST_URI] =>/forum/test/a/B/c
[SCRIPT_FILENAME] =>/home2/youyaxli/public_html/forum/test/index. php
[SCRIPT_NAME] =>/forum/test/index. php
....
[ORIG_PATH_INFO] =>/a/B/c
[ORIG_PATH_TRANSLATED] =>/home2/youyaxli/public_html/forum/test/index. php
[PHP_SELF] =>/forum/test/index. php
[REQUEST_TIME] => 1366441199
[Argv] => Array
(
)

[Argc] => 0
)

How to say yesIts url is rewritten. the following part of the file must be authentic.What about it?

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.