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 trialSzabolcs Szána
6,961 PointsMy webserver can't found the contact page
I finished the 'Building Websites with PHP' course. In the workspace works everything perfectly but i uploaded this project to gtihub and deploying to my webserver.
If i click to contact page, write this error: The requested URL /github/emerson/contact was not found on this server.
Here is the GitHub link: https://github.com/szanaszabolcs/emerson My server: http://szanaszabolcs.com/github/emerson/
3 Answers
Alena Holligan
Treehouse TeacherYou just need to add a .htaccess file with the following code:
RewriteEngine On
# Some hosts may require you to use the `RewriteBase` directive.
# If you need to use the `RewriteBase` directive, it should be the
# absolute physical path to the directory that contains this htaccess file.
#
# RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
Szabolcs Szána
6,961 PointsSzabolcs Szána
6,961 Pointsor Alena Holligan :)
Szabolcs Szána
6,961 PointsSzabolcs Szána
6,961 PointsOh my god. I'm sorry, but when i coding this project on workspace i created .htaccess file so i can't understand where did it go. Thanks the answer Alena Holligan! =)
Alena Holligan
Treehouse TeacherAlena Holligan
Treehouse Teacherhidden files (like .htaccess) can be difficult to work with. don't feel too bad ;) just remember to check those :)