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 ...


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 ...


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 ...


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

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 ...


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}...


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 ...


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 ...


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