I've got a website where all demands are rerouted quietly (via .htaccess) to index.php after which PHP can be used to exhibit the right page (by crossing the REQUEST_URI).

I'm wondering if you can submit Publish data to some fake address too?

I have presently experienced my form like so

<form action="/whatplant/send-mail" method="publish" id="contact-us-form">

And my .htaccess rule is

# redirect mail posting to index

     RewriteRule send-mail index.php?send-mail [NC,L]

My index.php inspections isset($_GET['send-mail']) which works fine.

Nevertheless this appears to decrease off all of the Publish data that needs to be delivered to it.

It is possible to method to keep your publish data? I'd rather not use GET since it can't send just as much information, though may possibly not be an problem having a simple enquiry form.

Thanks!

EDIT: I transformed the form's action to some test.php with print_r($_Publish) and also got the right output. I'm still getting problems finding the publish data once the action is distributed to index.php

Here's my .htaccess for redirecting to index.php

# serve files and dirs when they exist please, otherwise send to index

    RewriteCond % !-d

    RewriteCond % !-f

    RewriteRule . index.php

Do this:

# redirect mail posting to index

     RewriteRule send-mail index.php?send-mail [NC,P]

"P" functions like "L" for the reason that it stops processing rules it informs the module the request ought to be passed on the proxy module intact (meaning Publish information is maintained).

You need to have the ability to simply redirect to index.php, after which for the reason that script, access $_SERVER['REQUEST_URI'] to determine the initial request, with "send-mail" intact.

Incidentally, "can't send just as much information" isn't the reason to make use of Publish. The main reason to make use of Publish would be that the request will modify data in your site, rather than simply locating data.

Suppose you place a web link in your page having a GET request like "/remove_user?id=1234," and more internet search engine accidently follows the hyperlink as it is indexing your website. This is exactly why GET demands are harmful to demands that modify data.

As lengthy when you are only utilizing an internal rewrite, no HTTP redirect, you shouldn't lose Publish data. This is actually the rule I personally use on my small site:

RewriteRule ^(.*)$ index.php/$1 [L]

Use the HTTPLiveHeaders extension for Opera (or something like that similar) and track the whole page request. Make certain you aren't getting an HTTP redirect. If you achieve a HTTP/1.1 3xx response and Location: http://address header, that's the issue. Your rewrite rule that you simply published shouldn't cause that to occur. So if you are rerouted, there's most likely either a mistake inside your PHP code or any other rewrite rule that's being applied.

I do not have sufficient points to resolve Bill directly but his solution won't work. With "client side" redirects, browsers don't maintain Publish data in subsequent demands. Only "server side" redirects have possibility of keeping the Publish data intact.