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

  • SEARCH
  • Home
  • 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 8621153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:45:20+00:00 2026-06-12T06:45:20+00:00

I had to adjust some paths on my site and I need to use

  • 0

I had to adjust some paths on my site and I need to use .htaccess to redirect the items on the chance a user accesses the old url.

For example my old urls (relative) could be:

/old-path/page1.php
/old-path/page2.php
/old-path/page3.php
etc...

I had to change the path (for this example) to new-path and I need to adjust the .htaccess so anyone that comes to any page with …/old-path/… will be redirected to

.../new-path/...

Also, would this satisfy the 301 or would I need to list out each page?

  • 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-12T06:45:21+00:00Added an answer on June 12, 2026 at 6:45 am

    You can use either mod+alias:

    Redirect 301 /old-path /new-path
    

    or using mod_rewrite:

    RewriteEngine On
    RewriteRule ^/?old-path/(.*)$ /new-path/$1 [L,R=301]
    

    These could be in the htaccess file in your document root or in the server/vhost config. If you already have rewrite rules somewhere, you may just want to stick with mod_rewrite because redirecting with mod_alias while using mod_rewrite can sometimes give conflicting results.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had a debate about macros and their readability. I think that in some
I had to adjust the height of the UINavigationBar for this iPhone app. Now
In order to specify some things first: The user should be able to create
Had a really difficult time titling this one - please adjust as you see
I had some problems with my server so i built my portlets and tested
I need to get a text bounding box to adjust my layout before rendering
It's been a while since I've had to adjust project build settings. After upgrading
I have some conditions and rules in my .htaccess: RewriteCond %{DOCUMENT_ROOT}/assets/img$1/.$2.$4/$3.$4 -f RewriteRule ^assets/img(.*)/[a-zA-Z0-9-_\.]*\.[^/]+\.[a-z]{2,4}$
I had a html5 canvas with an image. Peoples can edit/ adjust image using
Had to download Command Line Tools from Apple to get make to work, but

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.