Forum Moderators: phranque
http://www.example.com/credit-card-applications/card-id/1 - Individual Pages
http://www.example.com/find-credit-cards/good-credit/1 - Category pages
The site was working fine on the old host. The transfer was done using WHM so I don't think any files could have gone missing in the process. I checked the .htaccess files at the old and new host, and the content are the same.
I asked the new host if Options +FollowSymLinks is enabled and they replied yes. I tried removing Options +FollowSymLinks from the .htaccess file but it did not make a difference.
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^article-detail article-detail.php
RewriteRule ^credit-card-applications carddetail.php
RewriteRule ^contact contact.php
RewriteRule ^news-detail news-detail.php
RewriteRule ^find-credit-cards list_cards.php
RewriteRule ^search search.phpRewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com
RewriteRule ^(.*)$ http://www.example.com/$1 [R=permanent,L]
Can you guys help me with this problem?
[edited by: jdMorgan at 11:55 am (utc) on Nov. 19, 2007]
[edit reason] example.com [/edit]
If your script uses certain internal server variables, then rewrite looping could cause it to operate incorrectly.
Since I don't know how your scripts work, I cannot tell if looping is the cause of your problem, but I'd suggest the following changes:
Options +FollowSymLinks
RewriteEngine on
#
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
#
RewriteCond %{REQUEST_URI} !\.php$
RewriteRule ^article-detail article-detail.php [L]
#
RewriteRule ^credit-card-applications carddetail.php [L]
#
RewriteCond %{REQUEST_URI} !\.php$
RewriteRule ^contact contact.php [L]
#
RewriteCond %{REQUEST_URI} !\.php$
RewriteRule ^news-detail news-detail.php [L]
#
RewriteRule ^find-credit-cards list_cards.php [L]
#
RewriteCond %{REQUEST_URI} !\.php$
RewriteRule ^search search.php [L]
There are several ways to prevent this rewrite looping. The above is the brute-force method. You could do this in several ways, but I show the simplest, most straightforward method here.
Jim
The redirect from non www to www is the only thing that works.
I'm at loss on what to do as the site is displaying fine in the old host but not at the new host.
If both servers are Apache 2.x, then make sure AcceptPathInfo is enabled on the new host. See Apache 2.x core docs for more info on this directive.
Jim
Jim
Anyway I took a look at the script and found this
<?
function display_card($card_array)
{
?>
As a last resort, can you recommend me anyone who might know the solution? I'm willing to pay.