Page 1 of 1

rewriterule not working after server transfer

Posted: Fri May 11, 2007 10:08 pm
by potato
hi,

i recently moved my site to another server. Before it used apache1, now apache2
also php has changed from 4 to 5.
All works fine, exept a problem i find with .htaccess redirects

before i routed the visitors that use a pda to a special pda-page. It worked fine until the server tranfer.
I do this with following .htaccess file:

Code: Select all

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} "^.*Windows CE.*$" [NC,OR] #Windows CE and Pocket PC
RewriteCond %{HTTP_USER_AGENT} "^.*NetFront.*$" [NC,OR] #PalmSource WebBrowser 2.0 
RewriteCond %{HTTP_USER_AGENT} "^.*Palm.*$" [NC,OR] #Eudora Web Browser for Palm 
RewriteCond %{HTTP_USER_AGENT} "^.*Blazer.*$" [NC,OR] #Handspring Blazer Browser 
RewriteCond %{HTTP_USER_AGENT} "^.*Elaine.*$" [NC,OR] #RIM Devices 
RewriteCond %{HTTP_USER_AGENT} "^.*WAP.*$" [NC,OR] #WAP Browsers 
RewriteCond %{HTTP_USER_AGENT} "^.*Plucker.*$" [NC,OR] #Plucker Offline download client 
RewriteCond %{HTTP_USER_AGENT} "^.*AvantGo.*$" [NC] #AvantGo Service 
RewriteRule ^index\.html$         index.pda.html          [L]
Again, this worked fine, so it has to be something with the server.
I admin the server, so i can change everything, but dont have any clue on what could be the problem (or solution :wink: )

Somebody any idea?

many thanx,
tom

PS: maybe usefull also: we used cpanel before, now directadmin...

Re: rewriterule not working after server transfer

Posted: Fri May 11, 2007 11:39 pm
by linkmania
potato wrote:hi,

i recently moved my site to another server. Before it used apache1, now apache2
also php has changed from 4 to 5.
All works fine, exept a problem i find with .htaccess redirects

before i routed the visitors that use a pda to a special pda-page. It worked fine until the server tranfer.
I do this with following .htaccess file:

Code: Select all

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} "^.*Windows CE.*$" [NC,OR] #Windows CE and Pocket PC
RewriteCond %{HTTP_USER_AGENT} "^.*NetFront.*$" [NC,OR] #PalmSource WebBrowser 2.0 
RewriteCond %{HTTP_USER_AGENT} "^.*Palm.*$" [NC,OR] #Eudora Web Browser for Palm 
RewriteCond %{HTTP_USER_AGENT} "^.*Blazer.*$" [NC,OR] #Handspring Blazer Browser 
RewriteCond %{HTTP_USER_AGENT} "^.*Elaine.*$" [NC,OR] #RIM Devices 
RewriteCond %{HTTP_USER_AGENT} "^.*WAP.*$" [NC,OR] #WAP Browsers 
RewriteCond %{HTTP_USER_AGENT} "^.*Plucker.*$" [NC,OR] #Plucker Offline download client 
RewriteCond %{HTTP_USER_AGENT} "^.*AvantGo.*$" [NC] #AvantGo Service 
RewriteRule ^index\.html$         index.pda.html          [L]
Again, this worked fine, so it has to be something with the server.
I admin the server, so i can change everything, but dont have any clue on what could be the problem (or solution :wink: )

Somebody any idea?

many thanx,
tom

PS: maybe usefull also: we used cpanel before, now directadmin...
Have you enabled mod_rewrite on the new server?

Posted: Sun May 13, 2007 5:47 am
by potato
i dont know. how can i check this? Is it written in php.ini?

I cant find it there, maybe because i use suphp now.

Posted: Sun May 13, 2007 2:39 pm
by John Cartwright

Code: Select all

phpinfo();
should tell you under loaded modules, I believe.

Posted: Sun May 13, 2007 4:14 pm
by potato
only something about rewriteurl, no mod_rewrite.

heres a phpinfo page http://www.iboost.nl/phpinfo.php

Posted: Sun May 13, 2007 10:58 pm
by Kieran Huggins
sometimes adding:

Code: Select all

Options -Indexes IncludesNOEXEC FollowSymLinks
to the top of my .htaccess files solves the issue, so I try that first.

Re: rewriterule not working after server transfer

Posted: Sat Feb 02, 2008 2:05 am
by moonmoon
well/. :mrgreen: