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

141
Views
Redirect Old URLs To new URL (subdirectory to main directory)

I have a website on my subdirectory. My all URL was mywebsite.com/sub/page-or-post-link

I have moved my site to the main directory. mywebsite.com.

I want to redirect my old link to new links.

Like if someone searches mywebsite.com/sub/a-post-or-page.

They should redirect to mywebsite.com/a-post-or-page

How can I do this with javascript, jquery, or with changing .hraccess?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can use RewriteRule in .htaccess file. This one should make a job:

Options +FollowSymLinks
RewriteEngine On
RewriteRule ^sub/(.*)$ http://mywebsite.com/$1 [R=301,L]
about 4 years ago · Juan Pablo Isaza 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!