Ask a pseudo-static question. ask a pseudo-static question.
When I get the whois query, it's pseudo-static.
Http://whois.hangye5.com/womai.cn
RewriteEngine on
Rewritebase/
ErrorDocument 404/404 .html
RewriteCond % {REQUEST_FILENAME }! -D
RewriteCond % {REQUEST_FILENAME }! -F
RewriteRule ^ (. *) $ index. php? Domain = $1 [QSA, PT, L]
This is acceptable.
But now I want to add one more file, which is pseudo-static.
Whois.hangye5.com/sitemaps/sitemap1.html
Whois.hangye5.com/sitemaps/sitemap2.html
Whois.hangye5.com/sitemaps/sitemap3.html
Such
I don't know how to add content to it.
I added a problem.
Reply to discussion (solution)
I don't know your actual path. according to your original statement, you can only write a rough
^ (. *)/(\ W +)/(\ w+).html $ index. php? Domain = $1 & p1 = $2 & p2 = $3
According to the link whois.hangye5.com/sitemaps/sitemap1.html
P1 = sitemaps, p2 = sitemap1
P1 and p2 correspond to the parameters of your application. you can modify them by yourself.
Http://whois.hangye5.com/sitemaps/sitemap.php? Domain = 1
This is the case before there is no pseudo
RewriteEngine on
ErrorDocument 404/404 .html
# RewriteCond % {REQUEST_FILENAME }! -D
RewriteCond % {REQUEST_FILENAME }! -F
RewriteRule ^ (. *) $./index. php? Domain = $1 [QSA, PT, L]
RewriteRule ^ (. *)/(\ w +)/(\ w+).html $/sitemaps/sitemap. php? Domain = $1 & p1 = $2 & p2 = $3
This is not the case.
Try this
RewriteRule ^ (. *)/\ w +/[A-za-z] + (\ d +) \. html $ index. php? Domain = $2
RewriteEngine on
ErrorDocument 404/404 .html
# RewriteCond % {REQUEST_FILENAME }! -D
RewriteCond % {REQUEST_FILENAME }! -F
RewriteRule ^ (. *) $./index. php? Domain = $1 [QSA, PT, L]
RewriteRule ^ (. *)/\ w +/[A-za-z] + (\ d +) \. html $/sitemaps/sitemap. php? Domain = $2
This is not acceptable.
Index. php and sitemaps/sitemap. php are different files.
Before rewriting: http://whois.hangye5.com/sitemaps/sitemap.php? Domain = 1
After rewriting: http://whois.hangye5.com/sitemaps/sitemap1.php
RewriteRule ^ (. *)/sitemaps/sitemap (\ d +) \. html $1/sitemaps/sitemap. php? Domain = $2
You can try again. if you can't, you can't do it anymore ....
Wrong
After rewriting: http://whois.hangye5.com/sitemaps/sitemap1. html
No, he will still go to index. php. This problem is probably caused by the first pseudo-static problem.
RewriteRule ^ (. *) $./index. php? Domain = $1 [QSA, PT, L]
This rule transfers all non-real pages to index. php.
The L indicates that the rewrite rule processing is completed, that is, the rules after successful matching will not be checked again (to avoid wasting resources)
So this article should be written to the front
RewriteRule ^ (. *)/(\ w +)/(\ w+).html $/sitemaps/sitemap. php? Domain = $1 & p1 = $2 & p2 = $3
RewriteEngine on
ErrorDocument 404/404 .html
RewriteCond % {REQUEST_FILENAME }! -D
RewriteCond % {REQUEST_FILENAME }! -F
RewriteRule ^ (. *)/sitemaps/sitemap (\ d +) \. html $1/sitemaps/sitemap. php? Domain = $2
RewriteRule ^ (. *) $ index. php? Domain = $1 [QSA, PT, L]
This is not the case. it is estimated that the last time it affected the Next
RewriteEngine on
ErrorDocument 404/404 .html
RewriteRule ^ sitemaps/sitemap(%0-9%%%%%.html $/sitemaps/sitemap. php? Domain = $1 [L]
RewriteCond % {REQUEST_FILENAME }! -D
RewriteCond % {REQUEST_FILENAME }! -F
RewriteRule ^ (. *) $ index. php? Domain = $1 [QSA, PT, L]
This works.