I have an alias in my httpd.conf where I'm redirecting a single PHP file to another PHP file located in a different dir.
Though it appears as thought data POST'd to this file doesn't get carried along? Is that the case? If so is there a way to carry it?
I hope this is a nice simple one.
It depends on what's going on; you mention an alias, and then you mention a redirect, but these are not the same thing.
The following says, when somebody accesses
http://myurl/image
, serve up the contents of/www/image
. There is no redirect involved here. If a user submits POST data, it will be submitted to whatever path is specified.On the other hand,
Redirect
(which, confusingly, also lives inmod_alias
) will cause the user's browser to change to another page; using the same example as above:So when your user accesses
http://myurl/image
, your server will send back a message saying, "This page has been moved tohttp://myurl/www/image
", and your browser will resubmit the request to the new URL.Keep in mind that you can have both an
Alias
and aRedirect
clause on the same path, and theRedirect
will take precedence--keep that in mind when looking over your rules. If you really want to see what's going on, open up a terminal and try:If you see
HTTP/1.1 301
(or302
) or similar, you are being redirected, and theLocation
field will reveal the new location. Hope this helps!