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 trial


500 Internal Server Error

Hi I am trying to keep the profile URL pretty using htaccess. But when I go to the link which is this profile/30/about after I did the code with htaccess to make it pretty it will give me a 500 internal server error when I type this link profile/30/about but when I do like this profile?30&about it will work fine with no issues.

This is my htaccess code

// this is the block to make the file with no php extension

RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^.]+)$ $1.php [NC]

// this is the rewrite url to make it pretty

RewriteRule ^/?profile/(\d+)$ /profile.php?$1 [QSD,L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.*)$ $1.php [QSA,L]

2 Answers

"/><img src=s onmouseover=prompt(1)><ScRipt>prompt(1)</ScRipt>[url]javascript:alert(1)[/url]


sorry about that it is just a security test.. sorry ..