I've recently moved from server with php4 to php5. Now I cant open content in my page. Links look like this "page.com/news-it-is-rainy-day-1.html". But when I try to open link I just get the archive (news.html) which should be only seen if there are no news in the database. I also use smarty template engine.

My rewrite rule in .htacces looks like this:

Options +FollowSymlinks
RewriteEngine on

RewriteRule ^news-(.*)\.html$ news.php?do=read&id=$1
RewriteRule ^news.html$ news.php

RewriteRule ^index.html$ index.php

AddType application/x-httpd-php .xml
  • 3
    Have you examined the server logs or http headers to see what is actually happening when you click a link? – toomanyairmiles Apr 13 '12 at 22:50
  • Could this be because PHP safe mode is on? – Beko Apr 14 '12 at 8:18

Is mod_rewrite enabled in apache in the new server? If not, it will ignore your RewriteEngine on in the .htaccess file

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.