I recently moved from a common shared cPanel hosting to a dedicated server. Everything works with normal WordPress installations except a custom website performing a targeted HTACCESS rewrite.
Basically takes the domain’s third-level and sets it as dedicated parameter, but not on targeted URLs.
This is the code
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^(.*).mywebsite.com [NC]
RewriteCond %{REQUEST_URI} !(css|js|img) [NC]
RewriteCond %{REQUEST_URI} !(ajax.php) [NC]
RewriteCond %{REQUEST_URI} !(bridge.php) [NC]
RewriteCond %{REQUEST_URI} !(updates.php) [NC]
RewriteCond %{QUERY_STRING} !^author=
RewriteRule ^ /?author=%1 [L,QSA]
Summarizing: handling https://5.mywebsite.com, must process the URL as https://5.mywebsite.com?author=5
As is, the server returns a blank page with “File not found.” error.
In addition, the $_SERVER[‘REQUEST_URI’] variable contains only a slash.
Is there anything wrong/missing in the server configuration? Any potential improvement I could do with my HTACCESS code? thanks