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

177
Views
Redirecting website page from domain to subdomain

I need your help

I moved my website from domain

http://www.example.com to http://oldwebsite.example.com

I have lots of pdf document with link

http://www.example.com/documents/news/test.pdf

Whenever a user click on the above link, I would like to automatically redirect all the PDF file.

http://www.example.com/documents/news/test.pdf to http://oldwebsite.example.com/documents/news/test.pdf


http://www.example.com/documents/news/onetest.pdf to http://oldwebsite.example.com/documents/news/onetest.pdf

I am using an apache server with PHP.

Thanks for your help

Tairon

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

You can do this redirect old website to new website by .htaccess file. You need to update you .htaccess file in your old website folder

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR]
  RewriteCond %{HTTP_HOST} ^www.olddomain.com$
  RewriteRule (.*)$ http://www.newdomain.com/$1 [R=301,L]
</IfModule>
over 4 years ago · Santiago Trujillo Report

0

Quite easy, just use mod_rewrite. There are thousands of tutorials on the web.

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!