Posted by lloydpearsoniv on April 23, 2010 at 4:24pm
When I migrate or import an existing site. Everything verifies fine, but when i attempt to access any page other than the home page on the sites....i get a 404 error.
Any idea as to what may be causing this???
Comments
Clean urls maybe?
Maybe it's an issue with clean urls being on or off?
Sounds like mod_rewrite is
Sounds like mod_rewrite is not enabled on your server, or something wrong with your platform-wide apache config (in /var/aegir/config/platform.d) which is basically a copy of your platform's .htaccess file. Does your platform have a .htaccess file?
Try this other solution
I encountered this situation before and posted a solution here:
http://groups.drupal.org/node/53013
The pattern is: the home page displays but all other pages get a 404 error.
tried it, but it didnt work me
my platform does have a configuration file
here is what is in it.
Order allow,deny
Allow from all
Extra configuration from modules:
RewriteRule sites/%{SERVER_NAME}/files/backup_migrate - [F]
RewriteRule files/backup_migrate - [F]
# allow files to be accessed without /sites/fqdn/
RewriteRule ^files/(.*)$ /sites/%{HTTP_HOST}/files/$1 [L]
Do not read the platform's .htaccess
AllowOverride none
I tried the solution that you you mentioned in the aegir.conf file & it didnt work for me.
It's missing the contents of
It's missing the contents of the platform's htaccess, which does all the clean url stuff and more.
I am 99% sure your platform is missing the .htaccess file. Maybe you copied it with a * wildcard which didn't pick up the file with a dot (.) prefix
Exactly
Had the same problem and this was exactly the case. Thanks! Saved me a headache.
Check your apache error log.
Check your apache error log. If nothing obvious there add RewriteLog and RewriteLogLevel directives to your vhost conf and restart apache.
Thanks Guys
Yes the problem was with the platform. i reinstalled aegir because i had trouble with upgrading. So i ported over my custom distribution of openatrium from the last install of aegir....and thats where the problem was.
Platform messed up
I had the same issue and found that actually using Drush to install the same version of Drupal was the best solution. Everything was happy as clams!
Shane Bill
Freelance Web Developer
Same Problem / Recommended Fix Doesn't Work
I am having the very same problem as originally reported in this post, but I have been able to correctly implement the .htaccess for the problem platform. The platform config file looked like this:
<Directory /var/aegir/platforms/drupal-6.15>
Order allow,deny
Allow from all
# Extra configuration from modules:
RewriteRule sites/%{SERVER_NAME}/files/backup_migrate - [F]
RewriteRule files/backup_migrate - [F]
<IfModule mod_rewrite.c>
# allow files to be accessed without /sites/fqdn/
RewriteRule ^files/(.*)$ /sites/%{HTTP_HOST}/files/$1 [L]
</IfModule>
# Do not read the platform's .htaccess
AllowOverride none
</Directory>
All of the .htaccess stuff was missing. So, I just copied the platform configuration file from another of my platforms and changed the path for the Directory directive, but I am still quite 404s.
Thanks for any help.
HAJ
After you have put the
After you have put the .htaccess in place on the platform you need to reverify the platform so that the .htaccess is read in, and so that Apache gets restarted to pick up the change.
how to restart apache
I am having a free webhosting site.
how do I restart the apache in this case.
edit : I was trying to change the base .htaccess file and no change was happening.
after banging my head and read the below particular line from my webhosting site, I found that I had to edit //.htaccess file. phewwww
All our servers support .htaccess by default. Usage is unrestricted so you can put any rules or PHP flags to .htaccess file
But, there is one thing you should know about .htaccess and mod_rewrite rules:
We use virtual user home directory paths, so you may get errors when trying to set up search engine friendly URL's. All you need to do to fix this issue is add the below line to the very top of your .htaccess file:
RewriteBase /
Make sure this line is placed before all the other rules (on the first line of .htaccess file). That's it. Now your rewrite rules will be working fine.
Note: if you are installing your script to some directory such as www.yourdomain.com/forum/, you have to place RewriteBase /forum/ line to the .htaccess file which also must be located in public_html/forum/ directory.