help with .htaccess and mod rewrite

Posted on 2011-10-06
Last Modified: 2012-05-12
Hi experts,

I need some help with a htaccess redirect I want to do. But somehow I dont get it work. Maybe somebody can help me with this.

I would like to forward all urls which have the pattern -vt# dosent matter if subdirectory or how ever the url looks.

What I need is that for example the url:
/xxxxxx/xxxxxx/word-vt200.php forward to /phpbb/viewtopic.php?t=200

The entire url is not important to me except the NUMBER behind the -vt which I need to forward to the parameter t=

I also dont care what it before the -vt part or what comes after the -vt# (number) part.

Can somebody help me with this?

Thanks in advance
Question by:Oliver2000
    LVL 16

    Accepted Solution

    I think that this should do it

    RewriteRule	-vt([0-9]+)	/phpbb/viewtopic.php?t=$1

    Open in new window


    Assisted Solution

    Working 100%!

    Thank you so much....perfect!

    Author Closing Comment

    Thank you, works perfect!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    PRTG Network Monitor: Intuitive Network Monitoring

    Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

    Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
    Read about why website design really matters in today's demanding market.
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    The viewer will learn how to dynamically set the form action using jQuery.

    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

    18 Experts available now in Live!

    Get 1:1 Help Now