Forum Moderators: phranque
I just changed hosts from a shared server to a VSP and I am having problems with configuring the mod_rewrite module I think ...
I am no expert when it comes to Unix at all but I did manage to set up a few virtual hosts for the sites I own.
I moved the sites I own to the new virtual hosts and I am working on the first
Joomla (the CMS is Use) works...well It loads the frontpage and OpenSEF seems to work to as the dynamic urls are changed to the SEF url's I defined.
BUT the pages are not loading I just receive a regular 404 message not even the 404 page I defined in the sef module.
The same actually goes for wordpress it opens the frontpage but the searchengine friendly urls do not open the actual pages
in the httpd.conf file I added this for the new virtual host
<VirtualHost *:80>
DocumentRoot /home/username/html
ServerName [url]www.mydomainname.com[/url]
<Directory "/home/username/html">
Options All
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ServerAdmin [email]webmaster@mydomainname.com[/email]
ServerAlias *.mydomainname.com
Options Indexes
</VirtualHost>
the following is my .htaccess file that works on the shared host
<Limit GET POST>
order allow,deny
allow from all
deny from 206.145.80.235
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
# BEGIN mambo
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule . /index.php [L]
</IfModule>
# END mambo
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mydomainame.com
RewriteRule (.*) [mydomainame.com...] [R=301]
I really have no clue what be going wrong
any help is very much appreciated
!
Thanks
Danny
PS I did not change the DNS yet so the pages are loaded from
[IPnumber~username...]
Would it make a difference if the DNS was changed from where my pages are still hosted on my shared server to the new?
Cabo
as I wanted to get my site to work smoothly before changing the dns I forgot one tiny thing
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule . /index.php [L]
</IfModule>
I had this in my htaccess but it should have been this
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /~username/
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule . /~username/index.php [L]
</IfModule>
It works like a charm now
I was all the time looking at the wrong files ... I think I opened the httpd.conf file more than 100 times...