RewriteRule: different result depending on the PC

Posted on

RewriteRule: different result depending on the PC – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about apache-2.2, .htaccess, , , .

I have this line in my .htaccess

RewriteCond %{SERVER_PORT} ^443$
RewriteCond %{HTTP_HOST} !^test.mypage.eu [NC] 
RewriteRule (.*)$ https://test.mypage.eu [R=301,L]

When i do the request, it’s doing the redirection OK from one PC but from another one no. Any idea what can be the problem?

Regards

Javi

Solution :

Check that you rewrite module is activated on the second box, some distro ship with that module disabled by default.
On debian-based distros you can use a2enmod rewrite to enable it, don’t forget to restart apache after that.

Leave a Reply

Your email address will not be published.