I’m a newbie here. I installed a wordpress in a server run by Apache2. But the wordpress doesn’t load index.php page. I can access deshboard and all other categories are displaying well. but the home url is not loading the index.php. Eventhough i try to added /index.php at the end of url, still it’s not working. It just display 404 error. When i look at the theme directory and wordpress directory there are (index.php) files.
so I googled for solution. some suggested to add [directoryindex index.php] in .htaccess file. I did that and that result in 500 internal server error.
Some post in google suggest to look at dir.conf and httpd.conf under Apache2. In my httpd.conf file, I have this line of code
… would be the correct code (and not cause any 500 errors).
What you did not show was your WP .htaccess code which has some minor problems which need to be addressed (but should have given you index.php, anyway), i.e., REMOVE <IfModule> wrappers and RewriteBase / and RewriteCond %{REQUEST_URI} index\.php as each causes a different problem. In the RewriteRule, I prefer .? to just ., too. There are explanations throughout WP threads but I’ll repeat them here on request.
Second, it’s bad etiquette to hijack a thread - better to start your own.
Third, DirectoryIndex is an Apache core directive which needs a series of files WITHIN THE DIRECTORY which should be served (ordered by order of precedence, the first found will be the one served) so your / is a syntax error (which causes the 500 error status).
Finally, your mod_rewrite also has some major problems:
First, NEVER use an <IfModule> wrapper in an .htaccess file. Yes, WordPress used that but only to prevent nastygrams from “webmasters” who didn’t realize that the module was not available. However, to use the <IfModule>, you’ll be ABUSING the server by asking it to test module support several times for each and every file request. That always draws my Standard Rant #4:
[rant #4][indent]The definition of an idiot is someone who repeatedly does the same thing expecting a different result. Asking Apache to confirm the existence of ANY module with an <IfModule> … </IfModule> wrapper is the same thing in the webmaster world. DON’T BE AN IDIOT! If you don’t know whether a module is enabled, run the test ONCE then REMOVE the wrapper as it is EXTREMELY wasteful of Apache’s resources (and should NEVER be allowed on a shared server).[/indent][/rant 4]
Then, since you’ve installed WP in a subdirectory, the RewriteBase handles the redirection to that subdirectory, i.e., do not include it in the redirection!
# BEGIN WordPress
[COLOR="#FF0000"]<IfModule mod_rewrite.c>[/COLOR]
RewriteEngine On
RewriteBase /panelcreative/staging/
[COLOR="#FF0000"]RewriteRule ^index\\.php$ - [L][/COLOR]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .[COLOR="#0000FF"]?[/COLOR] [COLOR="#FF0000"]/panelcreative/staging/[/COLOR]index.php [L]
[COLOR="#FF0000"]</IfModule>[/COLOR]
# END WordPress
DirectoryIndex [COLOR="#FF0000"]/[/COLOR]index.php