Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8708011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:00:41+00:00 2026-06-13T04:00:41+00:00

so we had a development site up for example: test.domain.com/dev/filename.html and its been indexed

  • 0

so we had a development site up for example: test.domain.com/dev/filename.html and its been indexed by Google so i need to redirect them to http://www.newdomain.com/filename.html but not just files but also folders/files like.

test.domain.com/dev/example/filename.html

or
http://www.newdomain.com/example/example/filename.html

to

http://www.newdomain.com/filename.html

note that the /dev/ folder on test domain cannot be pushed on the redirect?

Anyone have any ideas on this?

i have tried:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !test.domain.co.uk/dev/$ [NC]
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [L,R=301]

after some tests this redirects to http://www.newdomain.com/dev/page.html and i need to remove the /dev/ …..

and some other options while hunting around but nothing yet meet the requirement.

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T04:00:42+00:00Added an answer on June 13, 2026 at 4:00 am

    You also need RewriteCond so try:

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^test.domain.com [NC]
    RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working on a site for a client who has a dev.sitename.com subdomain for development,
when I had my site on development environment - it was url: testurl.com Now
Here's the site in question: http://cbcsettlementfunding.com/dev/ Almost finished up with development, just have a
Lately I had to reinstall my development site on my ubuntu machine since my
I'm currently developing a tutorial site for teaching the fundamentals of Web development (HTML,
I have the following page on a site in development: http://telamon.com.s137737.gridserver.com/media/press/ I want to
I've had a lot of good experiences learning about web development on w3schools.com .
If I had to following file on my development branch: # file.rb class Code
I had one Git repository (A) which contains the development of a project until
So for development purposes, we had our folder structure for our website something like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.