How to make the server accept these .htaccess lines?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

How to make the server accept these .htaccess lines?

Postby FrankC » 15. March 2013 05:06

.
I would like to keep my local files in sync with my remote files, including the .htaccess. But it I put
Code: Select all
ExpiresActive On
ExpiresDefault "modification"
in it, I get a 500 internal local server error, while on the remote server there is no problem.

The RewriteEngine lines do not give any error. How can I make the local server accept the Expires line as well?
FrankC
 
Posts: 16
Joined: 23. October 2011 03:57
Location: Amsterdam, The Netherlands
XAMPP Version: 1.7.7
Operating System: Windows Vista Basic

Re: How to make the server accept these .htaccess lines?

Postby Altrea » 15. March 2013 05:34

Does your Apache error.log file contain any message about this error?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
free software according to purpose of usage
XAMPP 1.8 for local development/testing only
Zend Server 6 (free) for production environments
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 4639
Joined: 17. August 2009 13:05
XAMPP Version: 1.8.1
Operating System: W7Ux64

Re: How to make the server accept these .htaccess lines?

Postby FrankC » 15. March 2013 08:15

Thanks for the speedy reply! :D

It does:

Code: Select all
[Fri Mar 15 04:52:47 2013] [alert] [client 127.0.0.1] C:/xampp/htdocs/Websites/TSE/.htaccess: Invalid command 'ExpiresActive', perhaps misspelled or defined by a module not included in the server configuration.


But I don't know what to do with that, because .htaccess in itself is accepted -- the RewriteEngine lines prove that. And it is not misspelled either, see httpd.apache.org/docs/2.2/mod/mod_expires.html.
FrankC
 
Posts: 16
Joined: 23. October 2011 03:57
Location: Amsterdam, The Netherlands
XAMPP Version: 1.7.7
Operating System: Windows Vista Basic

Re: How to make the server accept these .htaccess lines?

Postby Altrea » 15. March 2013 11:08

Is mod_expires included and activated in your Apache httpd.conf?
By default it is commented out.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
free software according to purpose of usage
XAMPP 1.8 for local development/testing only
Zend Server 6 (free) for production environments
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 4639
Joined: 17. August 2009 13:05
XAMPP Version: 1.8.1
Operating System: W7Ux64

Re: How to make the server accept these .htaccess lines?

Postby FrankC » 15. March 2013 12:52

That did the trick. Not at first, but after restarting Apache it worked perfectly. Thanks!

Just one question: why is that commented out by default? Isn't caching until modified very important for a speedy site rendering, and isn't through .htaccess the only way to accomplish that?
FrankC
 
Posts: 16
Joined: 23. October 2011 03:57
Location: Amsterdam, The Netherlands
XAMPP Version: 1.7.7
Operating System: Windows Vista Basic

Re: How to make the server accept these .htaccess lines?

Postby Altrea » 15. March 2013 13:02

XAMPP is a local testing and development environment. Speed by caching is not the primary focus i think.
And it can be very confusing (and increasing the support amound here) to beginners having issues of old cached data.

but the real reason is: XAMPP is based on the Apache binaries of ApacheLounge and there is and was no need to activate the module because most users don't miss it (and if, they can easily activate it).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
free software according to purpose of usage
XAMPP 1.8 for local development/testing only
Zend Server 6 (free) for production environments
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 4639
Joined: 17. August 2009 13:05
XAMPP Version: 1.8.1
Operating System: W7Ux64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 15 guests