Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

201
Views
How can I use Apache's mod_rewrite to redirect requests that do not go to the home/index page?

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
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

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]
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!