If the url is not successfully rewritten, you have to open the home page. if the url is accessed by other methods, error 404 is returned.

Source: Internet
Author: User
Failed to rewrite the url. you can only open the home page. if you open other pages, the url & nbsp; is not successfully rewritten. you can only open the home page. if you open other pages, the url reports an error 404 .. godaddy's luxury linux host is used. The customer service says it supports url rewriting. The website uses douphp1.1, the background has enabled url rewriting, and the. htaccess provided by douphp is uploaded to the root directory of the host. You can only open the home page. if the product link cannot be opened, the error 404 is returned... Failed to rewrite the url. only the home page can be opened. if other pages are opened, error 404 is returned.
The url cannot be rewritten. you can only open the home page. if you open other pages, the error 404 is returned ..
Godaddy's luxury linux host is used. The customer service says it supports url rewriting. The website uses douphp1.1, the background has enabled url rewriting, and the. htaccess provided by douphp is uploaded to the root directory of the host. You can only open the home page. if the product link cannot be opened, the error 404 is returned... The. htaccess code is attached. please give me some advice. Some people say that # RewriteBase/is removed from the previous. I tried it. no. some people say they want to configure http. conf, but there is no such folder in ftp.




Order deny, allow
Deny from all


RewriteEngine On

# RewriteBase/
RewriteCond % {REQUEST_FILENAME }! -F
RewriteCond % {REQUEST_FILENAME }! -D
RewriteCond % {REQUEST_URI }!. * \. (Ico | gif | jpg | jpeg | png | js | css)

# Main
RewriteRule ^ index \. html $ index \. php [L]
RewriteRule ^ sitemap \. xml $ sitemap \. php [L]
RewriteRule ^ (404 | 301) \. html $1 \. html [L]

# News
RewriteRule ^ news (/o) * ([0-9] *) $ article_category \. php \? Page = $2 [QSA, L]
RewriteRule ^ news (/*) ([a-z0-9-] *) (/* o *) ([0-9] *) $ article_category \. php \? Unique_id = $2 & page = $4 [QSA, L]

RewriteRule ^ news/([0-9] +) \. html $ article \. php \? Id = $1 & rewrite = 1 [QSA, L]
RewriteRule ^ news/([a-z0-9-] +)/([0-9] +) \. html $ article \. php \? Id = $2 & unique_id = $1 [QSA, L]

# Product
RewriteRule ^ product (/o) * ([0-9] *) $ product_category \. php \? Page = $2 [QSA, L]
RewriteRule ^ product (/*) ([a-z0-9-] *) (/* o *) ([0-9] *) $ product_category \. php \? Unique_id = $2 & page = $4 [QSA, L]

RewriteRule ^ product/([0-9] +) \. html $ product \. php \? Id = $1 & rewrite = 1 [QSA, L]
RewriteRule ^ product/([a-z0-9-] +)/([0-9] +) \. html $ product \. php \? Id = $2 & unique_id = $1 [QSA, L]

# Onepage
RewriteRule ^ ([a-z0-9-] +) \. html $ page \. php \? Unique_id = $1 [QSA, L]
RewriteRule ^ guestbook (/) * ([a-z] *) (/* o *) ([0-9] *) $ guestbook \. php \? Rec = $2 & page = $4 [QSA, L]
------ Solution --------------------
You can test the simplest one.
RewriteEngine On

RewriteRule rule 1.html $ 1.php

Create a 1. php file
1.html to see if it is useful.
------ Solution --------------------
Can your rewrite take effect?
It should be in


Medium?

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.