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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T02:07:19+00:00 2026-05-11T02:07:19+00:00

If I do it by typing /?id=some_text in url then index.php script works as

  • 0

If I do it by typing /?id=some_text in url then index.php script works as it shuld but if I do /some_text then index.php always receives id to have value ‘index’.

At first I had RewriteRule ^([^/]+) ?id=$1 but that returned ‘Internal Server Error’ instead web page, then I changed it to RewriteRule ^([a-z]+) index.php?id=$1 and I stoped reciving error page but script started to receive ‘index’ as value no matter what i typed in

This rule worked on local machine using MAMP, but when I uploaded it on server it stoped working.

.htaccess file for this folder only contains this rule

RewriteEngine on RewriteRule ^([^/]+) ?id=$1 
  • 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. 2026-05-11T02:07:20+00:00Added an answer on May 11, 2026 at 2:07 am

    I believe it was probably trying to recurse through index.php since it appears to match the rule.

    Try:

    RewriteEngine On RewriteCond  %{REQUEST_URI}  !index RewriteRule ^([^/]+) index.php?id=$1 [L] 

    The RewriteCond is to ensure it doesn’t apply the rule to the results of itself. And [L] is to make sure it doesn’t try applying any other rule.

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

Sidebar

Related Questions

I have the following in myfile.php $json_data = '{type:email,msg:some text}'; Instead of typing email
I have seen that typing about:somekeywords in browsers address bar gives some information. What
I could swear I've seen people typing function headers and then hitting some key
When typing in my URL SalaryFor/Microsoft/Balmer i need to display salary for user with
I have a textarea which when typing some text into, after so many line
I'm working on a PHP search script that scans a text file repository of
This is for learning purposes. I wrote a script that will simulate typing. The
Just want some direction really. Want my search box to have text inside, but
I have a UITextView that i use for typing some text (i have added
I have a textbox with default text like Enter Name Once user starts typing

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.