Hi everyone,
I am not sure whether I have my configurations wrongly. I am using the updated wordpress version.
My website e.g.
http://www.mywebsite.com.
I can view mydomain.com but not
http://www.mywebsite.com. It will not show page can't be displayed or loads forever.
I am using Ubuntu 10.04 LTS 64 bits and apache2.
Any help please? Thank you.
My .htaccess as below:-
Note: I tried the commented version, but it didn't work or worst show error 500
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#RewriteCond %{HTTP_HOST} ^mywebsite.com$
#RewriteRule ^(.*)$ "http\:\/\/www\.mywebsite\.com\/$1" [R=301,L]
#RewriteCond %{HTTP_HOST} *!^www*.mywebsite\.com [NC]
#RewriteRule (.*)
http://www.mywebsite.com/$1 [L,R=301]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
In /etc/apache2/sites-available/mywebsite.com (ln -s in sites-enabled)
<VirtualHost *:80>
ServerName mywebsite.com
#ServerAlias *.mywebsite.com (can't work)
#ServerAlias
http://www.mywebsite.com (can't work too)
ServerAdmin webmaster@localhost
DocumentRoot /home/myuser/mywebsite.com/public
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /home/myuser/mywebsite.com/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
<Directory "/home/myuser/mywebsite.com/public">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
<Directory "/home/myuser/mywebsite.com/public/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /home/myuser/mywebsite.com/logs/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
</VirtualHost>
In /etc/apache2/sites-available/default, I didn't modify anything
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>