htaccess redirect wildcard

Posted on 2007-10-16
Last Modified: 2013-12-09
I have an old site that is indexed in Google and would like anything that was under the path below to redirect:

(so for example there were several pages under this path like:)

to now go to:

how would I do this with htaccess?

Question by:danomatic
    LVL 48

    Expert Comment

    place the .htacces in the document root of and try:

    RewriteEngine On
    RewriteBase /
    ^NewsEvents/PressReleasesdetail/tabid/.*  [R]

    So everything requested under is redirected to the new site at
    LVL 3

    Author Comment

    This won't work because the old site is windows server and does not have htaccess.  

    I should have clarified this, the old site and the new site have the same domain name, it's just that all the links changed. sorry about that. We moved from windows dot net nuke to PHP / MYSQL Joomla.

    so I think I am looking to do something like a 301 redirect within the htaccess of the current site.
    LVL 48

    Expert Comment

    You can use a RewriteEngine for IIS like
    Or google for "IIS rewrite engine" and use a suiteable one.
    LVL 3

    Accepted Solution

    I was able to do this:
    RedirectMatch 301 ^/NewsEvents/(.*) http://

    this way whatever was under NewsEvents goes to the new page
    LVL 1

    Expert Comment

    Closed, 500 points refunded.
    Community Support Moderator

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
    Read about why website design really matters in today's demanding market.
    This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now