New answers tagged

0

Your header isn't making it to your documents. I tried curl --head 'https://www.aurigaspa.com/wp-content/uploads/Top-Banking-Trends-for-2019-and-How-Banks-Need-to-Prepare-White-Paper-Auriga.pdf' curl is a command line program. You can run it yourself after SSHing into your server, or you can download and install it onto your home computer. My guess is ...


2

I think you have two problems: You don't say your bye.php should redirect. Right now you have it specified as a rewrite rather than a redirect. You need to add [L,R] flags to it to get it to redirect. You don't need your slash rules at all anymore. Because you didn't specify "last" with the [L] flag, on your bye.php rule, the slash rules are also taking ...


1

I believe this can be done by changing IP of another.example to example.com and adding some codes in the .htaccess file. You certainly should not be "changing the IP" of any domain. (What was your reasoning behind this?) This sounds like a relatively simply redirect that can be performed in the .htaccess file. A condition is required that checks for the ...


2

Would it be better to put all these scripts into a sub-folder first? Yes. Then create a .htaccess file in that subdirectory with the following (mod_authz_core) directive: Require all denied (Assumes Apache 2.4+) This will return a 403 Forbidden response for anyone trying to access anything inside that subdirectory. Even better, put these PHP "includes" ...


1

The HTTPS version displays the security warning of course (as there is no SSL certificate) and then a 404 if you go past that. If you get a "security warning" that you are able to bypass then the server is listening on port 443 and there is a security certificate installed but for a different domain/hostname. When you bypass this invalid certificate then ...


2

You need the .htaccess file in the document root in order to rewrite a request of the form /area/somethingelse.php to the /pages subdirectory in the root (ie. /pages/area/somethingelse.php) before the .htaccess file in the subdirectory (ie. /pages/area/.htaccess) is able to rewrite the request a second time to /pages/area/pages/somethingelse.php - the ...


1

To externally redirect the request from /product-configurator (I assume the missing u was a typo?) to /bikes-configurator when the HTTP Referer contains bikes=1 in the query string part of the URL then you could do something like the following using mod_rewrite near the top of your .htaccess in the document root: RewriteEngine On RewriteCond %{HTTP_REFERER}...


2

tl;dr You're HTTP to HTTPS redirect is in the wrong place. It needs to go near the start of the /clickandbuild/bebechan/.htaccess file, not at the end. (See below for further explanation.) There seems to be a lot of misinformation / confusion here... The host that takes care of my SSL just told me "The SSL that we provide with your contract only protect ...


1

# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / # Additional rewrite rules go here RewriteRule ^[0-9]{4}/[0-9]{2}/(.*)$ /$1 [R=301,L] : Any custom mod_rewrite directives, such as your "redirect" should go before the # BEGIN WordPress section. You should avoid editing between the WordPress comment markers as WP itself tries ...


1

OK. So after having spelled out the question and posted it, I finally found the solution in this blog post. # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / # Additional rewrite rules go here **RewriteRule ^[0-9]{4}/[0-9]{2}/(.*)$ /$1 [R=301,L]** RewriteRule ^index\.php$ - [L] RewriteCond %{...


1

Since this is a WordPress site, you presumably have other mod_rewrite directives in your .htaccess file to drive the WP "pretty" permalinks. The behaviour you are experiencing would seem to be consistent with having put the redirect directives in the wrong place, ie. after the WordPress front-controller*1. This redirect must go before the existing WordPress ...


0

You must activate the option AllowOverride All to use .htaccess file. Also, you can add the Rewrite rules inside the Directory in the conf file like the below example or on your .htaccess file. <Directory "/srv/www/htdocs"> Options -Indexes +FollowSymLinks AllowOverride All RewriteEngine on RewriteCond %{SERVER_NAME} =example.com [OR] RewriteCond %{...


0

The following code will redirect all to https://www..... Make sure you are not using any other Wordpress plugin or configuration that could generate a conflict with it. RewriteEngine On RewriteCond %{HTTPS} off RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule .* https://www.%{HTTP_HOST}%{...


Top 50 recent answers are included