rewriterule not working after server transfer

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
potato
Forum Contributor
Posts: 192
Joined: Tue Mar 16, 2004 8:30 am
Location: my lovely trailer, next to the big tree

rewriterule not working after server transfer

Post 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...
User avatar
linkmania
Forum Newbie
Posts: 4
Joined: Thu May 10, 2007 1:45 am
Location: India

Re: rewriterule not working after server transfer

Post 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?
User avatar
potato
Forum Contributor
Posts: 192
Joined: Tue Mar 16, 2004 8:30 am
Location: my lovely trailer, next to the big tree

Post 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.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Code: Select all

phpinfo();
should tell you under loaded modules, I believe.
User avatar
potato
Forum Contributor
Posts: 192
Joined: Tue Mar 16, 2004 8:30 am
Location: my lovely trailer, next to the big tree

Post by potato »

only something about rewriteurl, no mod_rewrite.

heres a phpinfo page http://www.iboost.nl/phpinfo.php
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post 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.
moonmoon
Forum Newbie
Posts: 3
Joined: Sat Feb 02, 2008 1:58 am

Re: rewriterule not working after server transfer

Post by moonmoon »

well/. :mrgreen:
Post Reply