I am looking for a .htaccess
that does the following:
For users that visit
mydomain.com
, the server should return theindex.html
file from the root.For users that visit
mydomain.com/something/
,mydomain.com/anything/123/
,mydomain.com/some%20encoded%20text
, etc., the server should return theindex.php
file from the root and pass the text afterwww.mydomain.com/
as a PHP$_GET
variable.
I tried the WordPress .htaccess
:
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
But this redirects everything to the index.php
file.