Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: .htaccess problem  (Read 6974 times)

lilspen

  • Jr. Member
  • **
  • Karma: 2
  • Posts: 57
.htaccess problem
« on: January 28, 2008, 03:41:37 pm »

I am using xampp and for some reason if any folder has a .htaccess file in it the folder disappears from the web.
the folder is there(if i look at it from windows explorer) but it just isnt seen by the server(apache i guess i mean).

only if there is a ".htaccess" file there.
if i put a hta file in the root(htdocs) i cant access ANYTHING unless i remove or rename it.
it has nothing to do with whats in the hta file either.

any ideas?
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: .htaccess problem
« Reply #1 on: January 28, 2008, 06:29:37 pm »

I am using xampp and for some reason if any folder has a .htaccess file in it the folder disappears from the web.
the folder is there(if i look at it from windows explorer) but it just isnt seen by the server(apache i guess i mean).

only if there is a ".htaccess" file there.
if i put a hta file in the root(htdocs) i cant access ANYTHING unless i remove or rename it.
it has nothing to do with whats in the hta file either.

any ideas?

I am a little bit confused about what you are describing. Have you installed XAMPP on your own computer running WinXP?
.htaccess files will only be recognized by Apache... they have no other purpose but to provide Apache with directives.
If you create a .hta file... you will have problems because that is not a recognized file-type.

I have never yet experienced problems with having the proper.htaccess file within any sNews project folder. Each time I create a new sNews project, i create a project folder within the htdocs directory and add the sNews package to it. If I want to access my project in the browser with - http://localhost/siteone/ - then I create the siteone folder and put all the sNews files in it... configure the settings in snews.php and - bingo - it displays and works properly.  :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

lilspen

  • Jr. Member
  • **
  • Karma: 2
  • Posts: 57
Re: .htaccess problem
« Reply #2 on: January 29, 2008, 06:09:58 am »

sorry, I was on my PSP when I made that post.

I have installed XAMPP on my Windows ME machine.
It is the only computer I have at the moment, so don't say upgrade the computer or windows version. lol

I have had XAMPP on it for quite a long time but I don't use it very frequently.
I had just decided to install an uploader script (to check it out) but I noticed that when I tried to access it via Firefox (I have apache and MySQL running already) it shows a 500 error (I think it was a 500 error).

then I went to the root (http://localhost/) where I didn't have any index.* file to see the directory structure and the uploader folder was not there.

When I check it through Windows Explorer it shows up (because it isn't 'online').

I tried it with a number of folders and I tried it with the contents of the .htaccess files all commented out.
The only thing that makes the folder re-appear is if I rename or remove .htaccess.


So, if there is a .htaccess file in any folder, that folder will not 'exist' to apache.
Logged

henrich

  • Sr. Member
  • ****
  • Karma: 23
  • Posts: 381
  • Passion for quality and excellence!
    • My personal blog and portofolio
Re: .htaccess problem
« Reply #3 on: January 29, 2008, 06:15:01 am »

And if you remove the .htaccess file the folder will appear, i know, same problem i have myself, but if i remove the .htaccess file then sNews is not working. Currently my machine is too full with precious files and i am very careful with new installations, but the days of Ubuntu are very close :D
Logged
By(e) Henrich :)
------------------------------
IT related blog

invarbrass

  • Full Member
  • ***
  • Karma: 18
  • Posts: 117
    • http://snews.extremebittorrent.com
Re: .htaccess problem
« Reply #4 on: February 11, 2008, 03:50:47 pm »

A better way would be to run both linux and windows together. Grab the freeware VMware player, and download a virtual disk image of a linux dstro of your choice. I use the appliance from http://virtualappliances.net/ myself. Grandma's LAMP is also a choice if you want an easier GUI based linux VM.
Logged

raj

  • Newbie
  • *
  • Karma: 0
  • Posts: 2
Re: .htaccess problem
« Reply #5 on: June 14, 2008, 10:36:36 am »

I know its a long time after actual question is made. Your problem might have solved by this time but no one has posted correct answer for this problem. I am posting it now as it might be useful for others. I was using Apache2triad and could not work with Zend framework using apache2triad as it has PHP 5.1.X version. So I installed XAMPP(which has 5.2.5 version) but I got the same problem. When I have .htaccess for any of my projects in http://localhost/that project is not showing that folder at all. If I manually type it is giving some server error. I searched for it all over the internet and I solved it by doing the following. I found it from an article at the following link -

"http://www.lancelhoff.com/2008/04/04/how-to-make-wordpress-permalinks-work-in-xampp/".

For solving the problems with the .htaccess files(If you are using some Rewrite conditions) you have to enable it in the httpd.conf file. Go to your "apache" folder and then "conf" folder (In my case I installed xampp under C drive so it is "C:\xampp\apache\conf") and open the httpd.conf file. Search for "rewrite_module". You will find something like

"#LoadModule rewrite_module modules/mod_rewrite.so".

Remove the "#" and save it. Now restart the server.

In my case I was not able to restart my server so I restarted my system and it is working for me now. Also make sure that "Allow Override" is set to to "All" as described in the article under the link mentioned above.

Thank you,
Raj.
Logged

Buhmanator

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 52
Re: .htaccess problem
« Reply #6 on: August 06, 2008, 04:24:59 am »

Wow, thank you so much raj.  I have never had any problems with .htaccess before with Windows XP and XAMPP before, but just recently I started using them again, and I had that 500 error with .htaccess.  Your solution saved the day, thank you so much!
Logged