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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:57:09+00:00 2026-05-28T00:57:09+00:00

Several days ago I had a question about removing index.php from the address bar,

  • 0

Several days ago I had a question about removing index.php from the address bar, so the address of the page looks shorter and better. The shortest solution of this problem was (RewriteRule ^index.php / [L,R=301] in the .htaccess file). And it works!

Since I put that string into the .htaccess, some pages are redirected to the main page. I spent a lot of time to guess, why. As I understand, the answer is: with RewriteRule ^index.php / [L,R=301], $_POST parameters are not sent to the next page. $_GET parameters are OK.
Once I remove RewriteRule ^index.php / [L,R=301] from .htaccess, everything becomes fine as usual.
Why does it happen and how to fix that?

Thank you.

  • 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-28T00:57:10+00:00Added an answer on May 28, 2026 at 12:57 am

    The [R] flag will incur a redirect. And user-agents issue a redirect as GET request. There is nothing that can be done if you really want to shorten URLs down to the / root path.

    You could however block POST requests specifically from being rewritten/redirected:

    RewriteCond %{REQUEST_METHOD} !POST
    RewriteRule ^index.php / [L,R=301]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Several days ago,I post a question here about class inheritance Then someone provide a
Several days ago I attended a seminar and they were talking about dangerous PHP
Several days ago, all mail() calls in my custom PHP application cause a 500
Several days ago I posted this question(I don't know if it's proper to open
I asked several days ago about finding the most deeply nested lists . I
So I started learning java several days ago and got a question. For the
I have spent several days now researching Hibernate and have several small questions about
I know that cout have buffer several days ago, and when I google it,
Merging in my Mercurial repository is not working like I expected. Several days ago
Small and pretty nasty problem I've seen several days ago, asked to my friend

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.