Tag Info

Hot answers tagged

1

I did it like this: RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R,L] And it works just fine.


1

In short, you can't do what you're attempting to do. If the client is connecting to your server and expecting to talk HTTPS with you, you can't give it a non-HTTPS response. That's the point of "Secure" in HTTPS. You can either use a self-signed cert, or there are plenty of low-cost (or even free) SSL certificate providers out there.


1

Things to check: Is mod_rewrite enabled? (sudo a2enmod rewrite) Does it work outside the IfModule block? Simply remove the lines and see if that changes things. I suspect the first option will fix your problem.


1

Now we know your htaccess damage is, weirdly, intentional, here some suggestions towards a true solution: Your webserver is badly configured and causes many many error log writes. This in itself causes unnecessary IO disk writes and should be fixed. Fix all those errors (Especially around SSL) and your server will already be more capable. Or suppress error ...


1

mod_rewrite directives in .htaccess files in subfolders will trump ones in parent folders - try using RewriteOptions Inherit in each subfolder's .htaccess file (see http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewriteoptions). If you're running Apache 2.4.8 or higher, you can use RewriteOptions InheritDown to apply to all child .htaccess ...


1

Your concern is correct - clients whose browsers have retrieved the file will typically not receive the updated version until 1 month after they accessed it unless they happen to have cleared their browser cache or they do a reload on the page. One way around this is when you update the CSS file, change the HTML that references it to have ?v=2 or ?v=3 ...


1

Three different ways: Use Alias instead of Rewrite: Alias payment payment.php Alias payment-confirmed payment-confirmed.php Include a $, which means "end of the string": RewriteRule ^payment$ payment.php RewriteRule ^payment-confirmed$ payment-confirmed.php Move the lines around, so that the most specific line gets checked ...


1

Changing the port used by your host's webmail app will not be possible. Webmail on cPanel is served through port 2095 (or port 2096 for HTTPS). Making a port change would require full root access to the server. Bluehost won't give you root access since it is a shared hosting server. Non-root access also precludes any sort of server-side port forwarding ...


1

I am granted access to the page and its contents are visible. This is not what I expect. However, the configuration contains Require all granted so it is expected that access to the page and its contents is granted. Explanation Require all The all provider mimics the functionality that was previously provided by the 'Allow from all' and 'Deny from all' ...



Only top voted, non community-wiki answers of a minimum length are eligible