Skip to main content
18 events
when toggle format what by license comment
Jan 8, 2020 at 21:42 vote accept nschildre
Jan 8, 2020 at 21:39 history edited MrWhite CC BY-SA 4.0
Adde code analysis
Jan 8, 2020 at 21:34 comment added MrWhite If you are still on Apache 2.2 then that explains the server error when using RewriteOptions IgnoreInherit (requires Apache 2.4.8+). Yes, it would seem you will need to contact the "server team" to know what is going on here. Your redirect directive looks OK. Alternatively, you could implement this redirect within your web application (Drupal 7?) instead? I've updated my answer.
Jan 8, 2020 at 21:26 history edited MrWhite CC BY-SA 4.0
Update regarding the bypass of htaccess
Jan 8, 2020 at 19:42 comment added nschildre Apache 2.2.15. Yes there is no server error for subpages. I did add something at the start of the .htaccess and had again a server error for the homepage and no server error for the subpages. So I guess you are right, the server team here is blocking my .htaccess file for the subpages. I will have to contact them again to see why this is the case. I just wanted to double check that my directive code was correct. But I guess that is the case. Thanks for your help in figuring out this strange issue.
Jan 8, 2020 at 18:44 comment added MrWhite What version of Apache are you on? Can you check your server's error log for the details of that error? If there was no "Internal Server Error" for subpages then that would seem to imply that the .htaccess (or mod_rewrite) was completely bypassed for such requests?! Try adding some "random nonsense" to the start of the .htaccess file and repeat the test: homepage vs subpages.
Jan 8, 2020 at 17:50 comment added nschildre When I added RewriteOptions IgnoreInherit to my .htaccess file, I got an Internal Server Error on the homepage. There was no error on any of the subpages, but they were also not served over https.
Jan 8, 2020 at 9:02 comment added MrWhite Did that change anything?
Jan 7, 2020 at 23:35 comment added MrWhite Yes. You can add it at the top of the file, it doesn't matter. (What do you mean "URLs are routed by our server team"?)
Jan 7, 2020 at 23:26 comment added nschildre RewriteOptions IgnoreInherit is added inside the existing mod_rewrite after RewriteEngine on then followed by RewriteCond ...?
Jan 7, 2020 at 23:01 comment added nschildre URLs are routed by our server team.
Jan 7, 2020 at 22:54 comment added MrWhite Try (temporarily) addingRewriteOptions IgnoreInherit before your existing directives in your .htaccess file.
Jan 7, 2020 at 22:03 comment added nschildre Yes that is correct.
Jan 7, 2020 at 21:28 comment added MrWhite And where is the "root folder of your website"? Is this in the /spintx subdirectory? How are the URLs being routed?
Jan 7, 2020 at 19:45 comment added nschildre I don't control the server config/virtual host. My .htaccess file is located in the root folder of my website. I have the mod_rewrite issue with several websites that are hosted on that server, but my htaccess websites do work. In one instance I successfully increased the php_value memory_limit.
Jan 7, 2020 at 19:33 comment added MrWhite The "front-controller" could be in the main server config / virtual host. If it is then you won't be able to change this behaviour in .htaccess. Do you not control these aspects of the website? Where exactly in the .htaccess file located? Do you have other .htaccess files in subdirectories? "other htaccess directives on the server" - they are "Apache directives", .htaccess is just a context in which they can be used.
Jan 7, 2020 at 19:20 comment added nschildre That is the only mod_rewrite code in my htaccess file. I don't know if there are other htaccess directives on the server, since I am not maintaining the server. So could this front-controller be somewhere else on the server?
Jan 7, 2020 at 18:17 history answered MrWhite CC BY-SA 4.0