[SOLVED] htaccess Issues

Started by gouletf, April 03, 2018, 08:14:12 PM

Previous topic - Next topic

gouletf

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)

Gregg

What is the difference between htdocs/build & ${SRVROOT}/htdocs/build? Kinda confusing.

gouletf

I just wrote the ${SRVROOT} as a valriable to hold the name of the ServerRoot thats all
Define SRVROOT "/Apache/Apache24"
ServerRoot "${SRVROOT}"

Gregg

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.

gouletf

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.