Skip to main content
added nginx tag back to the question, since it is relative to it... see my last line in the question, among that I state it is a ServerPilot server
Source Link
Kevin
  • 133
  • 1
  • 2
  • 14

And ServerPilot's default nginx config for the app is:

location / { proxy_pass $backend_protocol://$backend_host:$backend_port; } 

I thought to do something like:

location ~* ^/university/ { proxy_pass $backend_protocol://$backend_host:$backend_port; } 

but it too does not seem to do anything...

Which, does indeed allow the case insensitive URL's to work... however, it does break Wordpress's permalinks, as all inner pages of the wordpress side now 404

ServerPilot processes requests as such: Web Browser -> Nginx -> Apache -> PHP-FPM, please leave the nginx tag on the question since it is relative to it. 

Which, does indeed allow the case insensitive URL's to work... however, it does break Wordpress's permalinks, as all inner pages of the wordpress side now 404

And ServerPilot's default nginx config for the app is:

location / { proxy_pass $backend_protocol://$backend_host:$backend_port; } 

I thought to do something like:

location ~* ^/university/ { proxy_pass $backend_protocol://$backend_host:$backend_port; } 

but it too does not seem to do anything...

Which, does indeed allow the case insensitive URL's to work... however, it does break Wordpress's permalinks, as all inner pages of the wordpress side now 404

ServerPilot processes requests as such: Web Browser -> Nginx -> Apache -> PHP-FPM, please leave the nginx tag on the question since it is relative to it. 
edited tags
Link
Richard Smith
  • 14k
  • 2
  • 27
  • 33
added 1171 characters in body
Source Link
Kevin
  • 133
  • 1
  • 2
  • 14

I have a ServerPilot server, running on Ubuntu 16.04.3

On it is an app that is a Wordpress website, but has other non-wordpress directories. In these directories is what I am concerned about.

I have verified that mod_speling is indeed enabled on the server... however, when I put in the

CheckCaseOnly on CheckSpelling on 

to my apps .htaccess file, the case insensitive URL's still resolve as Wordpress 404's instead of actually resolving.

Unfortunately, the site is in test/QA phase so I cannot give the actual URL, however, as an example:

https://www.example.com/university/Smartapp/External/index.html resolves properly, because in the app, that path is exactly that, with the capital S and capital E... however... the URL https://www.example.com/university/smartapp/external/index.html throws the Wordpress 404 Page Not Found

What can I do to get this working?

EDIT So close... I think what is happenning is Wordpress is processing first.

So... I implemented the following:

CheckCaseOnly On CheckSpelling On <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^/university/(.*)$ [OR] RewriteCond %{REQUEST_URI} ^/events/(.*)$ [OR] RewriteCond %{REQUEST_URI} ^/Videos/(.*)$ [OR] RewriteCond %{REQUEST_URI} ^/2017-holiday-card/(.*)$ [OR] RewriteCond %{REQUEST_URI} ^/Holiday-Card/(.*)$ [OR] RewriteRule ^.*$ - [L] </IfModule> # BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . index.php [L] # END WordPress 

Which, does indeed allow the case insensitive URL's to work... however, it does break Wordpress's permalinks, as all inner pages of the wordpress side now 404

I have a ServerPilot server, running on Ubuntu 16.04.3

On it is an app that is a Wordpress website, but has other non-wordpress directories. In these directories is what I am concerned about.

I have verified that mod_speling is indeed enabled on the server... however, when I put in the

CheckCaseOnly on CheckSpelling on 

to my apps .htaccess file, the case insensitive URL's still resolve as Wordpress 404's instead of actually resolving.

Unfortunately, the site is in test/QA phase so I cannot give the actual URL, however, as an example:

https://www.example.com/university/Smartapp/External/index.html resolves properly, because in the app, that path is exactly that, with the capital S and capital E... however... the URL https://www.example.com/university/smartapp/external/index.html throws the Wordpress 404 Page Not Found

What can I do to get this working?

I have a ServerPilot server, running on Ubuntu 16.04.3

On it is an app that is a Wordpress website, but has other non-wordpress directories. In these directories is what I am concerned about.

I have verified that mod_speling is indeed enabled on the server... however, when I put in the

CheckCaseOnly on CheckSpelling on 

to my apps .htaccess file, the case insensitive URL's still resolve as Wordpress 404's instead of actually resolving.

Unfortunately, the site is in test/QA phase so I cannot give the actual URL, however, as an example:

https://www.example.com/university/Smartapp/External/index.html resolves properly, because in the app, that path is exactly that, with the capital S and capital E... however... the URL https://www.example.com/university/smartapp/external/index.html throws the Wordpress 404 Page Not Found

What can I do to get this working?

EDIT So close... I think what is happenning is Wordpress is processing first.

So... I implemented the following:

CheckCaseOnly On CheckSpelling On <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^/university/(.*)$ [OR] RewriteCond %{REQUEST_URI} ^/events/(.*)$ [OR] RewriteCond %{REQUEST_URI} ^/Videos/(.*)$ [OR] RewriteCond %{REQUEST_URI} ^/2017-holiday-card/(.*)$ [OR] RewriteCond %{REQUEST_URI} ^/Holiday-Card/(.*)$ [OR] RewriteRule ^.*$ - [L] </IfModule> # BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . index.php [L] # END WordPress 

Which, does indeed allow the case insensitive URL's to work... however, it does break Wordpress's permalinks, as all inner pages of the wordpress side now 404

Source Link
Kevin
  • 133
  • 1
  • 2
  • 14
Loading