Hello.
I have two sites running in the same domain (the same sites, but the old in wordpress and the new custom)
I need to do:
If the client ask for a file that exists, then he can see it: (this works)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
Any other request goes to index.php
RewriteRule . /index.php [L]
Ok... but if you ask for / (www.site.com) you will have be redirected to www.site.com/site2 without going trough index.php
how can I achieve this? in pseudocode (bad english, sorry)
if(request == "/" || request == www.site.com) {
redirect site2/
} else if(ask_for_a_file_that_exists) {
server file
} else {
use old index.php
}