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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:16:35+00:00 2026-05-24T00:16:35+00:00

I have issue with a strange url request to my site.. that may come

  • 0

I have issue with a strange url request to my site.. that may come from bot or other website ..
i have researched all my code and link on web.. but not find and link like that
the url they request not in correct order is:

/modules.php?file=article&name=News&sid=281737

but the correct one should be

/modules.php?name=News&file=article&sid=281737

in fact the php can handle both of those … but i using static caching system , which makes two files on cache. Making lots of files is not good for web performance.

I need a php script that use $_SERVER[‘REQUEST_URI’] and regex to detect the wrong url
then send it to correct url with 301 header

Thanks for any advice.

  • 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-24T00:16:36+00:00Added an answer on May 24, 2026 at 12:16 am

    Do it at the web server level. Since you tagged your question .htaccess I’m assuming that’s Apache.

    RewriteEngine On
    RewriteCond %{QUERY_STRING} file=(.*)&name=(.*)&sid=(.*)
    RewriteRule modules.php modules.php?name=%2&file=%1&sid=%3 [R=301,L]
    

    I haven’t tested that, does it work?

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

Sidebar

Related Questions

I have a strange issue that has arisen recently: Whenever I enter text, even
I have a strange issue that I am asked to make a Spring MVC
I have a strange issue, I am trying to retrieve a XML string from
I have run into a strange issue where any URL containing PRN will return
I have a very strange routing issue. I have a ASP.NET MVC 3 site
Possible Duplicate: AJAX request fails to process $_SESSION variable I have some strange issue
I have got a very strange input issue in which it seems that my
I have a strange issue with writing a bitmap stream to WCF DataOutputStream request.
I have a very strange issue, that I'm hoping someone here can help me
I am seeing a strange issue when fetching a JSON object from a URL

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.