I have two websites. One is a Django App. The other is just a static site.
If someone were to submit https://example.com/more_info
I need to redirect them to https://example.co/more_info
Note the .com vs .co
But if they just request https://example.com then I serve them the index page.
I've unsuccessfully tried the code below in my .htaccess file:
RewriteEngine On
RewriteCond %{REQUEST_URI} !^(|/)$
Rewriterule (.*) https://example.com/$1
I think you want to redirect every page to https://example.co other than the home/index page. You can do this by:
RewriteEngine On
RewriteRule (.+) https://example.co/$1 [R=301,L,NE]