New answers tagged

0

This will use for both www or non-www If you try to open link with www then url redirect to https with www Example: http://domain.com redirect to https://domain.com or If you try to open link with non-www then url redirect to https with non-www Example: http://www.domain.com redirect to https://www.domain.com RewriteEngine on RewriteCond ...


2

To combine those three rules into one you can use alternation (with a vertical bar) in a capturing group and another backreference in the substitution: For example: RewriteRule ^(information|reviews|comments)/business-name/(.*)$ /$1/new-business-name/$2 [R=301,L] $1 is now a backreference to either "information", "reviews" or "comments". Depending on ...


0

My only other thought is to try a rewrite rule in Apache - but a conditional one. : Is this possible? Unfortunately not. The user sees the certificate error long before the request hits your server-side code. The only way to fix a certificate error is to fix the certificate. If this was not the case then security could be bypassed. the problem ...


3

RewriteRule ^lp/?$ /index.php [L] This fails to match because your actual URL is probably /lp/index.php (or whatever your DirectoryIndex is), not simply /lp/. (That is after Apache has internally mapped the URL to a filesystem path). So, try changing your RewriteRule pattern: RewriteRule ^lp/index\.php$ /index.php [L] Specifically, there is a ...


0

Here is the entire index.html: <script> console.log(self.location); </script> Well, that's the problem. You won't be able to see the rewritten URL (and query string) from client-side JavaScript. An internal rewrite is entirely internal to the server. JavaScript only sees the initial URL of the request - the URL displayed in the browsers ...



Top 50 recent answers are included