The error message "The requested document was not found on this server" was happening after I moved a Wordpress blog to another directory. I followed all the correct steps here but the error was still coming.
So it turns out, my .htaccess file was missing all along. To fix this:
You need to create a file called ".htaccess" (yes including the . at the start) and copy it, via ftp or whatever you use, it in the root folder of your Wordpress blog on your server.
Inside that file, enter the following and upload it. That should do the trick:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Programming solutions, source code, solutions to tech problems and other tech related stuff.
Showing posts with label htaccess. Show all posts
Showing posts with label htaccess. Show all posts
Thursday, January 27, 2011
Sunday, July 25, 2010
Enable .htaccess in Mac OS X Snow Leopard Apache
To enable .htaccess files in Mac OS X Snow Leopard:
1. Open terminal. Go to
cd /etc/Apache2
2. Then edit httpd.conf by typing:
sudo vi httpd.conf
3. Search for 'AllowOverride' by typing
/AllowOverride (+ return)
4. Change the line to:
AllowOverride All
(by using 'i' to insert and 'esc' to finish inserting text)
5. Search again for 'AllowOverride' by typing
/AllowOverride (+ return)
6. Change to:
AllowOverride All
7. Repeat these steps until all instances of AllowOverride are set to 'All'
8. Then save the file by pressing SHIFT+ZZ.
9. Then you need to edit your own website's file. CD to 'users' by
cd users
10. Then look for your conf file by typing:
ls
11. My file is called mark.conf, so I edit it by typing:
sudo vi mark.conf
12. Again, make sure the respective line reads:
AllowOverride All
13. Restart Apache by disabling then re-enabling 'Web Sharing' in System Preferences.
1. Open terminal. Go to
cd /etc/Apache2
2. Then edit httpd.conf by typing:
sudo vi httpd.conf
3. Search for 'AllowOverride' by typing
/AllowOverride (+ return)
4. Change the line to:
AllowOverride All
(by using 'i' to insert and 'esc' to finish inserting text)
5. Search again for 'AllowOverride' by typing
/AllowOverride (+ return)
6. Change to:
AllowOverride All
7. Repeat these steps until all instances of AllowOverride are set to 'All'
8. Then save the file by pressing SHIFT+ZZ.
9. Then you need to edit your own website's file. CD to 'users' by
cd users
10. Then look for your conf file by typing:
ls
11. My file is called mark.conf, so I edit it by typing:
sudo vi mark.conf
12. Again, make sure the respective line reads:
AllowOverride All
13. Restart Apache by disabling then re-enabling 'Web Sharing' in System Preferences.
Subscribe to:
Posts (Atom)