Forum Moderators: phranque

Message Too Old, No Replies

mod rewrite and .htaccess

         

pirteid

3:56 pm on Feb 4, 2008 (gmt 0)

10+ Year Member



Hi,
I have a problem with migrating of one site from an server to another.
The site use mod_rewrite and now it function just a part of it:
for example:
I have an formular who change the language (post)
If I am in www.mysite123.com/ and I change the language in english my url show www.mysite.com123/en/, but if I try to change again in German for example it don't work. I tried to see what is happened with phpinfo() and I observed that in second case (when I am already in a "virtual" director like "/en/") the _POST variable is not sent anymore to the page. If I change method of the form from post to get I see a variable $_SERVER["REDIRECT_QUERY_STRING"] from where I can extract the data ....but this is not a good solution because I must to change all the forms from entire site and to change the methods of taking the data.

I mention that on the old server all works great and I copy all the files from old server to the new one. On one old migration I was forced to change this old .htaccess with new one due to problems with apache version. Now I tested with both but it have the same result

.htaccess_old

Action throw /partnerprogramm2/index.php

<FilesMatch "^([^.]+)$">
ForceType throw
</FilesMatch>

<FilesMatch index.php>
ForceType application/x-httpd-php
</FilesMatch>

.htaccess

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule index.php [L]

Thanks in advance
Dragos Pirte

jdMorgan

7:43 pm on Feb 4, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If the servers involved are Apache 2.x, see the AcceptPathInfo directive in the Apache core documentation.

Jim