Is there any way to run the .htaccess file on the local server without being online?
Is there any way to run the .htaccess file on the local server without
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Not much detail in your question, but let me try an angle that hasn’t been taken yet (as far as I noticed).
If you’re asking why the .htaccess file works for this request:
Or even this request:
But not this request:
It’s because the first two are actual HTTP requests, requiring the page to be ‘served’ by Apache. Apache (assuming a correct configuration for your situation) processes the .htaccess file while serving the request.
That whole process is bypassed for the third ‘request’, because that’s not a HTTP request, that’s a local filesystem request. In that case the web browser is loading a file much like a word processor. No web server is ever contacted, so the .htaccess file is meaningless.
If that’s what you mean by local, then to my knowledge there’s no way to get a browser to process the .htaccess file for a local request.
But in the future, there’s a world of difference between requesting a flie for a local server, and loading a file from a local system.
Again, this is only my take on one way your question could be interpreted, if indeed you’re referring to requesting the file from a local web serve – check the configuration as many have suggested. (And check that you’re running Apache too.)