Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.htaccess file on windows server

I have done research and found that my htaccess file will not work on my new Windows server. I have seen that I should be using web.config.

I tried it and couldn't get anything to work. Then I saw that I can use an htaccess file, but I have to call it something else (like htaccess.txt).

I tried that but couldn't get it to work. I read later that I needed to call it something else then change my "AccessFileName". I have looked everywhere but still have absolutely no idea how to do that.

Any help is greatly appreciated! I am using a Godaddy Windows server.

like image 784
Christian Avatar asked Oct 19 '25 02:10

Christian


1 Answers

you do indeed have to use a web.config file. The GoDaddy Windows server you are using is running a webserver program called IIS, which uses web.config files. .htaccess is used by Apache HTTPD, which is a different web server.

The stumbling block you were probably hitting when you tried it last time is that a web.config file has substantially different syntax than an .htaccess file. Microsoft has a Knowledge Base article about setting up a web.config file, and a syntax reference linked within it

like image 81
Peter Elliott Avatar answered Oct 20 '25 21:10

Peter Elliott



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!