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 8702911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:45:56+00:00 2026-06-13T02:45:56+00:00

Setting up an .htaccess seems to be difficult for this situation. For a dating

  • 0

Setting up an .htaccess seems to be difficult for this situation. For a dating site we have this scenario:

We assume john is logged in:

domain.com/john //this works no problem

domain.com/?askout=yes&when=later //this doesn't work, if john is logged in and pastes 
                                    this url, it automatically redirects to domain.com/john
                                    instead, htaccess should see the ? and know it's
                                    not a valid user. It should keep the entire query,
                                    and redirect to /profiles.php?askout=yes&when=later

Here is the .htaccess:

RewriteRule ^(\w+)/?$ ./profiles.php?username=$1

Basically, I need to have .htaccess know that an immediate ? means not to use the above rewrite rule. Any idea how to accomplish this?

  • 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-13T02:45:57+00:00Added an answer on June 13, 2026 at 2:45 am

    Try:

    RewriteCond %{QUERY_STRING} askout=yes&when=later
    RewriteRule ^ /profiles.php?askout=yes&when=later [L]
    

    This rule needs to go before the rule you have redirecting to the ?username target.

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

Sidebar

Related Questions

I have problem with my .htaccess redirections. Say I want to change http://www.domain.com/login.php into
I'm being stuck setting up my htaccess properly. Currently I have the following situation
I'm setting up a site using a php bootstrap. It seems the ErrorDocument directives
I have this little .htaccess file: RewriteEngine on RewriteRule ^(.*)$ urlroute.php?q=$1 [E=myvariable:'withthisvalue',B,QSA] To direct
This seems to be a common issue but I have tried all the suggestions
I have a wordpress Multisite instance that for some reason defaults to domain.com (/blog
I have a directory with an .htaccess file having the setting IndexIgnore * .
Setting up a project structure; I am thinking is it better to have somewhat
We have a basic drupal multi-site installation on a RHEL (RedHat) server. For some
I am wondering whether we can declare session.gc_maxlifetime setting in .htaccess for the one

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.