Failed to rewrite the url. only the home page can be opened. if other pages are opened, error 404 is returned.

Source: Internet
Author: User
Tags godaddy customer service
The url cannot be rewritten. you can only open the home page. if you open other pages, the system reports the 404 error. the url cannot be rewritten successfully. you can only open the home page. if you open other pages, the system reports the 404 error ..
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]


Reply to discussion (solution)

Douphp's customer service said their files were okay. let me look for godaddy and say it was a host problem .. Godaddy customer service said they support url rewriting ....
I have been kicked.

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.

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.



This can be opened. Direct access to ***. com/1.html is OK. Open

Can your rewrite take effect?
It should be in


Medium?

Can your rewrite take effect?
It should be in


Medium?




Is added before RewriteEngine On And the last [QSA, L] is followed Right?
No ~

No one will help you ?????????

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.