In my .htaccess file, I have this code:
# -FrontPage-
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName xyz.com
AuthUserFile /home/localtig/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/localtig/public_html/_vti_pvt/service.grp
Options +FollowSymLinks
RewriteEngine on
RewriteCond $1 !(^index\\.php|\\.(gif|jpe?g|ico|css)|^robots\\.txt)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URL} !=/favicon.ico
RewriteRule ^(.*)$ http://xyz.com/index.php?q=$1 [L,QSA]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\\ /([^/]+/)*index\\.php\\ HTTP/
RewriteRule ^(([^/]+/)*)index\\.php$ http://www.xyz.com/$1 [R=301,L]
This should redirect a url like http://subdomain.xyz.com/sample-page to http://www.xyz.com/index.php?q=sample-page
…while retaining the URL in the address bar as http://subdomain.xyz.com/sample-page
The problem is that this same .htaccess file acts differently on 2 machines.
One of them has version 2.2.13 of apache, and another has 1.3.37. On the former, the redirect is becoming external (i. e. the URL in the address bar is changing), while in the latter (1.3.37), it works just fine.
I do not even know if (or think) the version is a problem, since the 2.2.13 version, for another site hosted on it using the same httpd.conf file and with exactly the same directives, works just fine for all rewrites.
Does anyone have a clue what is going wrong? I’ll be grateful for any help!