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

  • Home
  • SEARCH
  • 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 6667329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:55:18+00:00 2026-05-26T02:55:18+00:00

The problem: I cannot figure out how to match a literal dot in my

  • 0

The problem: I cannot figure out how to match a literal dot in my expression so I could rewrite query strings containing dots. First I tried something like this:

RewriteRule ^([\.\w]+)$ index.php?url=$1 [L]

I have a php script:

echo "url is: ".$_GET['url'];

which should, in theory, output anything that I write in my query. But for any query containing only letters and dots, my script always outputs:

url is: index.php

I’ve tried these expressions as well:

^(.+)$
^([.\w]+)$

And the result is the same.

So the question is: are my expressions wrong or does this have something to do with server’s config?

  • 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-05-26T02:55:18+00:00Added an answer on May 26, 2026 at 2:55 am

    It looks like there is another request which is processed before the rule is applied, if I use a rule which matches less than index.php (e.g. .. for matching xy), the result is as expected: xy. With more relaxing rules like .* or .+ it fails. x.* works fine however.

    You can add another condition to ignore requests like index.php:

    RewriteCond %{REQUEST_FILENAME} !index\.php$
    RewriteRule ^(.+)$ index.php?url=$1 [L]
    

    This was tested/ debugged with:

    <?php
    printf("url is: %s <br>\n", htmlspecialchars(filter_input(INPUT_GET, 'url')));
    echo "<pre>",htmlentities(print_R($_SERVER, 1));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a little newbie problem that I cannot figure out, I am having
Hello I have a very weird problem in chrome I just cannot figure out!
I have this little problem, that I cannot figure out which arguments to pass
I'm quite new to this, but i cannot figure out the problem. In twitter
I have read a ton about this problem, but I cannot figure it out.
I have this very annoying problem I cannot figure out. This is the main
this problem has been bothering me for days and I cannot figure out why
Short version of my problem: I cannot figure out how to make the action
I'm having a strange problem which I cannot figure out for the life of
I have run into this problem multiple times, and I cannot figure out why

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.