0

After several days of digging at the HTML5 History API, I found this great working example that suits my needs https://github.com/pinceladasdaweb/html5-history-api

However, when trying to run it on my local server/web hosting, I get an Internal Server Error, which leads me to think that there's something misconfigured in the .htacccess file.

Looked up at the Apache Error log and confirmed my theory, this was what error line tells:

"[...] .../html5-history-api-master/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration"

I'd like to know if I need to make specific configurations in the server to make the example run properly.

You can see a working demo done by the owner here: http://www.pinceladasdaweb.com.br/html5-history-api/

Any help will be really appreciated. Thanks!

nicozica
  • 423
  • 6
  • 18
  • No, you don't need any specific changes in .htaccess to change the browsers history from the clientside – adeneo Feb 01 '15 at 14:25
  • Thanks adeneo! Do you know what would be happening then? – nicozica Feb 01 '15 at 17:47
  • 2
    I say this all the time. **Stop trying to guess what's wrong**. That form of troubleshooting will lead your to hours of frustration. Just simply check your Apache `error_log` file and it will tell you exactly why there is a 500 error. That's what its for. No body will just know what the problem is. – Panama Jack Feb 01 '15 at 21:55

1 Answers1

1

This is what I have done to make it work.

1- As Panama Jack said in the comments, the answer of what was happening was in the log file wamp\logs\apache_error.log

[...] /html5-history-api-master/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

2- I enabled the rewrite_module on my local server (see Hardik Thaker for your visual reply to this post!

3- My web hosting is GoDaddy, I found out that I had to tweak the .htaccess file to make it work. This last post saved my life!

Hope it helps!

Community
  • 1
  • 1
nicozica
  • 423
  • 6
  • 18