Ask a pseudo-static question

Source: Internet
Author: User
Ask a pseudo-static question


I was making that Whois query pseudo-static.


Http://whois.hangye5.com/womai.cn this one.


Rewriteengine on
Rewritebase/
ErrorDocument 404/404.html
Rewritecond%{request_filename}!-d
Rewritecond%{request_filename}!-f
Rewriterule ^ (. *) $ index.php?domain=$1 [qsa,pt,l]


It's possible to use this.


But I'm going to get one more file on it now. Pseudo-Static
Whois.hangye5.com/sitemaps/sitemap1.html
Whois.hangye5.com/sitemaps/sitemap2.html
Whois.hangye5.com/sitemaps/sitemap3.html
Such a


Do not know how to do, do not know how to add content inside
I added the problem myself.


Reply to discussion (solution)

Do not know your true path, according to your original wording, can only write a general

^ (. *)/(\w+)/(\w+). html$ index.php?domain=$1&p1=$2&p2=$3

According to whois.hangye5.com/sitemaps/sitemap1.html, this link
P1=sitemaps,p2=sitemap1
P1,P2 is the parameter that corresponds to your application, you modify it yourself

Http://whois.hangye5.com/sitemaps/sitemap.php?domain=1
There's no hypocrisy before it's like this.
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
It doesn't feel right.

Give it a try.

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

Not this one.

index.php and sitemaps/sitemap.php are different files.


No rewrite before: 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 try again, no more, there is no way ....

Wrong

After rewriting: Http://whois.hangye5.com/sitemaps/sitemap1. Html

No, he will still run to the index.php. This problem is estimated to have gone wrong in the first pseudo-static.

Rewriterule ^ (. *) $./index.php?domain=$1 [Qsa,pt, L]
This rule turns all the Unreal pages to index.php.
That L means the end of the rewrite rule processing, which means that once the match succeeds the rules will not be checked again (to avoid wasting resources)

So this one's going to be written in 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 going to work, it's probably the last time it affected the next one.

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]

That'll do.

  • 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.