php - How to pass post data after url rewrite in .htaccess -


i use following code in htaccess file located in /projects/testsite

addtype x-mapp-php5 .php rewriteengine on rewritebase / options -multiviews   rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . projects/testsite/index.php [l,qsa]  #errordocument 404 /404.php 

when in http://www.mydomain.com/projects/testsite/admin/articles/1/edit , press save redirects request http://www.mydomain.com/projects/testsite/admin/articles/1/save

all post data lost.

what if try debug

post: array print_r: array ( ) get: array print_r: array ( )

what should .htaccess file keep redirecting requests index.php preserving post data?

thank in advance!

p.s. site works if set in windows server web.config rewrite rules.

update #1

from firefox live http headers see significant issue: 301 moved permanently header captured in apache (this not happening in iis)

http/1.1 301 moved permanently date: sun, 06 apr 2014 13:48:06 gmt server: apache location: http://mydomain.gr/projects/testsite/admin/articles/6/save vary: accept-encoding content-encoding: gzip content-length: 270 keep-alive: timeout=3, max=100 connection: keep-alive

content-type: text/html; charset=iso-8859-1

update #2

it seems there relation issue:

how preserve post data via ajax request after .htaccess redirect?

where asker finds out forcing 301 redirect rule every request on top of .htaccess file.

is hosting provider blame?

this quite baffling, hope saved same headache:

the problem located in parallels panel>websites & domains>mydomain.gr> hosting settings

locate select field:

preferred domain, set domain.tld requests www.domain.tld 301 redirection (you lose post data) forced parallels , not applications files.

note label in parallels warns that:

regardless of domain's url visitors specify in browser (with www prefix or without it), page preferred domain's url opens. http 301 code used such redirection. 'none' value means no redirection performed.

so solution change preferred domain none.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

c# - Unity IoC Lifetime per HttpRequest for UserStore -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -