Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSteve Linn
11,841 PointsTrouble getting permalinks to work on localhost
I have a mac that runs the default mac web server (apache and php)
going through the wordpress training- when I enable permalinks, they do not work on my machine. I get the following error message:
Forbidden You don't have permission to access /~steve02/allisongrayce/index.php on this server.
I read a little about permalinks and followed this tutorial to resolve it http://wordpress.org/support/topic/permalink-404-localhost-on-mac-os-x
I still cannot access the files via permalinks
What's interesting is that the Contact link that should go to page.php ---the error says forbidden on index.php
any suggestions?
Heres a little more information on how i set this up When I activate my permalinks to post name I get this error message
403 Forbidden
Forbidden
You don't have permission to access /~steve02/allisongrayce/index.php on this server.
Here is what I have done so far
htaccess file --permissions set to 777
Options -Indexes Options +FollowSymLinks
BEGIN WordPress
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase /~steve%202/allisongrayce/ RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /~steve%202/allisongrayce/index.php [L] </IfModule>
END WordPress
etc/apache2/httpd.conf
has the following code in it
User home directories
Include /private/etc/apache2/extra/httpd-userdir.conf
httpd-userdir.conf has the following code in it
Settings for user home directories
Required module: mod_userdir
UserDir: The name of the directory that is appended onto a user's home
directory if a ~user request is received. Note that you must also set
the default access control for these directories, as in the example below.
UserDir Sites
Users might not be in /Users/*/Sites, so use user-specific config files.
Include /private/etc/apache2/users/*.conf <IfModule bonjour_module> RegisterUserSite customized-users </IfModule>
steve 2.conf file has this code in it
<Directory "/Users/steve 2/Sites/"> Options Indexes MultiViews FollowSymLinks AllowOverride All AuthConfig
Allow from all
</Directory>
Any suggestions?
1 Answer
Steve Linn
11,841 PointsI figured this out
I just changed the permalinks type to custom then added the following
/index.php/%postname%/
it works - but I am not sure why
anyone have any idea why this worked?