The Apache Haus Forum

Forum Topics => Apache 2.4 => Topic started by: gouletf on April 03, 2018, 08:14:12 PM

Title: [SOLVED] htaccess Issues
Post by: gouletf on April 03, 2018, 08:14:12 PM
I have spent 5 days on this issue, my .htaccess file is not recognized by apache.
It is located in htdocs/build beside my index.html.
I have activated mod_rewrite, AllowOveride has been set to All. The file doesn't even throw a 500 error when i give it random text, it doesn't log. One the other hand the exact same httpd.conf and exact same react.js build and the same htaccess runs perfectly on my bosses computer. If I place the htaccess code (its redirect code for an SPA) into <Directory "${SRVROOT}/htdocs/build"> it runs with no fault.

I am running Windows 7, I have tested this on Apache Haus 2.4.33 now it's running on 2.4.12 (to verify if it was an issue with version 33)
Title: Re: htaccess Issues
Post by: Gregg on April 04, 2018, 05:49:18 AM
What is the difference between htdocs/build & ${SRVROOT}/htdocs/build? Kinda confusing.
Title: Re: htaccess Issues
Post by: gouletf on April 04, 2018, 03:35:58 PM
I just wrote the ${SRVROOT} as a valriable to hold the name of the ServerRoot thats all
Define SRVROOT "/Apache/Apache24"
ServerRoot "${SRVROOT}"
Title: Re: htaccess Issues
Post by: Gregg on April 04, 2018, 05:10:13 PM
I get that but you say it doesn't work in htdocs/build but does in ${SRVROOT}/htdocs/build and as far as I know they are both == c:\Apache24\htdocs\build. Even so I pondered this most of the day yesterday and could only come up with a problem in the filename (like missing a 'c' or an 's') so Apache couldn't recognize it. I have never had a problem with .htaccess files and even though I try to limit their use, I'm still using them.
Title: Re: htaccess Issues
Post by: gouletf on April 04, 2018, 10:26:53 PM
Thank you for your help I have solved the issue, when the react project is built the .htaccess file gets a .txt extension added to it. and I had file extensions turned off.