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

PHP Enhancing a Simple PHP Application Cleaning URLs with Rewrite Rules Get Variables and Rewrite Rules

saranyamoellers
saranyamoellers
31,691 Points

.htaccess

After I added .htaccess file in my shirts4mike folder, my folder is disappeared from my index of localhost? Please help.

8 Answers

Can you post your .htaccess file?

Also, you might have already tried this, but you can see questions other students have asked about this topic via this link or by looking at the 'Questions' tab under the video. There's a lot of information in there that you may find helpful.

Hi, What program are you using to view the files?

Could be that the .htaccess file is hidden by default. Check out:

Hope this helps :)

saranyamoellers
saranyamoellers
31,691 Points

Thank you for your help! I will check those links out . I use Dreamweaver and machine is windows.

Thanks again for your time.

No problem, let me know if that doesn't work :)

saranyamoellers
saranyamoellers
31,691 Points

Hi James, I did checked on show hidden files on my windows machine. but still not working. I also went to httpd.conf in Apache to set AllowOverride None to AllowOverride All. Oh well ,Thanks !

What software are you using? WAMP? XAMMP?

Which folder have you placed your files in? For example: C:\xampp\htdocs

Could you upload a screenshot to imgur or somewhere? It may help me to understand your problem.

Thanks

saranyamoellers
saranyamoellers
31,691 Points

I use Apache C:\data_www\shirts4mike the folder data_www is a folder I set up at school. After I created .htaccess file, my shirts4mike is disapeared when I go to localhost . It should be under the index of. But if I delete .htaccess file I can see shirts4mike folder under index of localhost.

saranyamoellers
saranyamoellers
31,691 Points

Hello, here it is

RewriteEngine On RewriteRule ^shirts/$ /shirt/shirts/shirts.php

saranyamoellers
saranyamoellers
31,691 Points

Hi James, I did it, I folder show up in my localhost now. Thank you so much for your help!

No problem :)