Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8140305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:07:07+00:00 2026-06-06T12:07:07+00:00

I am using Nginx, and I want to rewrite all url with the following

  • 0

I am using Nginx, and I want to rewrite all url with the following two params:

title=%E7%89%B9%E6%AE%8A

and

from=(any datatime)

to home page.

I don’t know how to write the rule, would any one help me?

Edit:

I want to rewrite urls like:

http://example.com/index.php?days=30&from=20120122083408&limit=250&title=%E7%89%B9%E6%AE%8A

or

http://example.com/index.php?from=20120622063000&limit=20&title=%E7%89%B9%E6%AE%8A

or

http://example.com/index.php?from=20030422063000&title=%E7%89%B9%E6%AE%8A

to

http://example.com
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T12:07:10+00:00Added an answer on June 6, 2026 at 12:07 pm

    Nginx doesn’t support logical AND operation, but we could use “little hack”:
    This should help you:

    location = /index.php {
        set $redirect "";
    
        # if we have get parameter "title":
        if ( $arg_title ) {
            set $redirect "Y";
        }
    
        # if we have get paramter "from":
        if ( $arg_from ) {
            set $redirect "${redirect}ES";
        }
    
        # Now in the variable $redirect should be a word "YES":
        if ( $redirect = YES ) {
            rewrite ^ / last;
        }
    
        ....
    }
    

    P.S. You also could use 302 redirect, to directly move user to / .

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is is possible to do the following using nginx rewrite: Convert a url from
I am trying to using Nginx to redirect from /t/latest/2 to /topics/latest/page/2 rewrite ^/t/latest$
I want to block all non-US users from accessing my website. I'm using nginx
Using nginx, I want to preserve the url, but actually load the same page
I'm using nginx 1.0.8 and I'm trying to redirect all visitors from www.mysite.com/dir to
I am using nginx on Rackspace cloud following a tutorial and having searched the
I'm new to nginx and I want to migrate my website from Apache to
I have a view that protects certain sensitive files from public download, using nginx'
I have a django project and want to deploy it using gunicorn and nginx.
I want to deploy Django application on nGINX server. I'm using uWSGI. I looked

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.