I just moved my Wordpress site from using nginx to Apache2, and found that the homepage could not be shown, instead, the browser prompt me to download it (the file download is exactly the one of index.php).
However, the strange thing is that, except the home开发者_运维知识库 page, all other pages (including the individual post page, wp-admin pages, rss, theme preview, etc.) work fine.
And i have another wordpress site hosted in the same machine, works fine.
Here is the .htaccess file: (this is actually what Wordpress did)
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
And here is what i got from the access.log
207.46.92.16 - - [30/Dec/2010:16:17:56 +0800] "GET /index.php HTTP/1.1" 301 - "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 1.1.4322; .NET CLR 3.0.04506; SLCC1; InfoPath.3; .NET4.0C; .NET4.0E; MS-RTC LM 8)"
Actually I did the following but no change:
- Disable mod_rewrite Copy the
- .htaccess from the correct wordpress site
Did anyone face anything like this or have any clue on this?
I also opens a link here. try the followings:
- http://www.weigblog.com/
- adding index.php (sorry i can't post more than 1 link)
- adding testphp.php
If one thing is for certain, the htaccess file has nothing to do with it.
Is it, maybe, possible that your server is unaware that PHP is an actual application? If you don't have the handlers setup (AddType application/x-httpd-php .php
) or the PHP module isn't loaded by Apache, the .php extension means absolutely nothing to the server.
Try to upload another file, called, say, info.php with only one line in it: <?php phpinfo(); ?>
and opening it in a browser. If it works, PHP is not the issue. If it doesn't, that's where your problem is.
I had the same problem I've solved renaming the web folder in /var/www/ to another name and now works fine.
I hope my experience be usefull for someone.
精彩评论