This is my code on /etc/apache2/sites-enabled/dynamic-vhosts.conf: My problem is, in some cases it’s force to HTTPS, but in other cases it’s not. Example: On some desktops browsers, it’s redirect to HTTPS, but on mobile browsers or on others desktops/servers browsers, it’s not. Anybody can help me? Answer Try this, but I am not so sure that this will fix your
Tag: mod-rewrite
htaccess misconfiguration 500
So basically i created a .htaccess file which removes .html extension and redirects /file.html to /file but when i write /file.html/ it causes a 500 internal server error, How can I map/file.html/ to my custom error page ? or simply redirect that also to /file.html Here is the code : Answer With your shown samples, could you please try following(comments
.htaccess RewriteRule keeping URL structure
My current rewrite rule: The result above works great so I can format the URL like domain.com/a/b/c I would like to add in a domain switch as well so the results I want is sub.domain.com/a/b/c when you access it using domain.com/a/b/c Currently here is what I have tried But the result of this is http://sub.domain.com/a=a&v=b&id=c and needs to be http://sub.domain.com/a/b/c
how to generic .htaccess to prevent hotlink
The following code works fine: but I want to make a generic script serve me for several sites I manage, but fails try to get Answer You can’t use variables inside the regex. You can work around this by using a RegEx backreference like so: (note the # is just used as a boundry. It could be any character that