Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
share|improve this question
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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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