.htaccess problems in new host

Discussion in 'Apache' started by swaz, Nov 19, 2007.

  1. #1
    I asked this in WebmasterWorld but seems like the members there don't know what is wrong either.

    I moved my site to another host recently and the pages are not displaying properly. All the individual pages eg : carddetail.php and list_cards.php are showing ALL the cards in the database instead of only specific cards.

    example.com / credit-card-applications/card-id/1 - Individual Pages
    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.php
    
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^example\.com
    RewriteRule ^(.*)$ http://www.example.com/$1 [R=permanent,L]
    Code (markup):
    Only the www redirect is working. If I remove the rewrite rules above, I get 404 pages.

    Help please?
     
    swaz, Nov 19, 2007 IP
  2. themasterinc

    themasterinc Banned

    Messages:
    216
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Perhaps it is the problem of file permissions put permits 644 at all. Php
     
    themasterinc, Nov 19, 2007 IP
  3. swaz

    swaz Active Member

    Messages:
    540
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    90
    #3
    If it's a permission problem, there should be some kind of errors message on the pages isn't it?
     
    swaz, Nov 19, 2007 IP
  4. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #4
    Options +FollowSymLinks +Indexes
    RewriteEngine on
    RewriteBase /
    RewriteRule ^article\-detail$ article-detail.php [L]
    RewriteRule ^credit\-card\-applications$ carddetail.php [L]
    RewriteRule ^contact$ contact.php [L]
    RewriteRule ^news\-detail$ news-detail.php [L]
    RewriteRule ^find\-credit\-cards$ list_cards.php [L]
    RewriteRule ^search$ search.php [L]
     
    Nintendo, Nov 19, 2007 IP
  5. swaz

    swaz Active Member

    Messages:
    540
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    90
    #5
    Thanks for the help but it gave me 404 pages.
     
    swaz, Nov 20, 2007 IP