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
Josh Alling17,172 Points
Lightbox stopped working after adding a rewrite rule
The homepage of a portfolio website I am working on has an animation on it, but I didn't want the animation to run every time the homepage is refreshed (because the homepage is also the portfolio page). I used php and a $_GET["id"] to make it so that the page only loads the CSS animation if the get variable is not set. Then I used a rewrite rule so that the url is /portfolio/ rather than /?id=portfolio.
Has anyone else had this issue, and does anyone know how to fix it?
Erik Nemesis13,356 Points
I think this is because when using the rewrite rule, you actually rewrite your url to get rid of your GET parameters. Therefore your $_GET['id'] will always be unset. How did you check your GET variable? Also could you please post some code (use jsbin or codepen preferentially)