SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2003
    Location
    earth
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to use Redirect?

    Hi, i am wondering if anybody can guide me on how to use RedirectMatch?

    i want a permanent redirect http://www.domain.com/category/anythinghere/ to http://www.domain.com/news/anythinghere.php

    where anythinghere can be anything (ie variable)

    I tried this:
    Code:
    RedirectMatch permanent /category/(.*)/$http://www.domain.com/news/$1\.php
    but it doesn't work. Any help? thank you.

  2. #2
    SitePoint Wizard rbutler's Avatar
    Join Date
    Jul 2003
    Location
    Springfield, MO
    Posts
    1,867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure how you do it in php but a general meta tag would do it, code below:

    Code:
    <META HTTP-EQUIV="refresh" CONTENT="10; url=
    
    http://www.tucats-design.com/eacz/index.html">


    Where content =10 would be number of seconds to wait, then url is where to redirect user
    Ryan Butler

    Midwest Web Design

  3. #3
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I know you are missing some white space between your first and second arguements.
    Code:
    RedirectMatch permanent /category/(.*)/$ http://www.domain.com/news/$1\.php


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •