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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:28:15+00:00 2026-05-19T09:28:15+00:00

This question is very similar to: Is it possible to redirect post data? (asked

  • 0

This question is very similar to: Is it possible to redirect post data? (asked eariler) but that answer does not seem to work for me.

I have a form:

<form action="http://a.test.com/contact" name="contact" method="post">

and inside of a add-on domain, (test.com is an addon), there is a subdomain (a.), and inside of there I have a file item.php, and .htaccess

my htaccess is as follows:

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^([^/]+)/$ $1.php 

# Forces a trailing slash to be added
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)$ /$1/ [R=301,L]

#normal rewrites
RewriteRule ^[~|-]?([a-zA-Z0-9]+)[/]*$ item.php?user=$1 [NC,L]

note: I left it as [NC,L] because when I changed it to [NC,P] it gives me a 500 server error.

and my item.php

<?php
echo "<pre>";
print_r($_POST);
echo "</pre>";

and no matter what the form contains, the $_POST is blank… however, if I do http://a.test.com/item.php?user=contact as the action.

all goes well. POSTing skips the htaccess, and the solution on SO doesn’t seem to work.

Thanks in advance

  • 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-19T09:28:15+00:00Added an answer on May 19, 2026 at 9:28 am

    Your “add trailing slash” rule forces a header redirect:

     [R=301,L]
    

    a header redirect will drop POST values.

    You will have to drop that rule, or disable it for POST submissions:

    # Forces a trailing slash to be added
    
    RewriteCond %{REQUEST_METHOD}  !=POST
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
    RewriteRule (.*)$ /$1/ [R=301,L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Liu Chang asked a very similar question to this one here, Linux equivalent of
(this question is very similar to my previous question Does it matter where I
This question is very similar to SQL Server 2005: T-SQL to temporarily disable a
Very similar to this question , except for Java. What is the recommended way
I apologise in advance if this question isn't very specific. Would it be possible
After posting this question and reading that one I realized that it is very
I'm sorry for this very newbish question, I'm not much given into web development.
I have a situation very similar to the one in this question: Selective Cache
The accepted answer to this question , and a similar discussion at work today
This question was very helpful, however I have a list control in my report,

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.