SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2001
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Any ideas how to do this?

    I'm guessing this would be mod_rewrite, but I'm not very good with that. Plus, it has to be done in the .htaccess file. Anyway, here goes:

    I've modularized part of my site, and I need to put in some kind of redirect, but I don't know exactly what to do. Basically, the old URLs looked like this:

    http://www.site.com/reviews.php?op=showcontent&id=369

    and the new ones look like this:

    http://www.site.com/modules.php?name=Reviews&rop=showcontent&id=369

    Is there any way to write a simple, one-line redirect that would change reviews.php? to modules.php?name=Reviews&rop every time such a file is requested? I really want to avoid having to make a gigantic htaccess that includes a line for every file (of which there are some 500+).

    Any suggestions?

    Thanks,

    Daniel
    Daniel

    http://www.dfbpunk.com

  2. #2
    epsilon transition cupid's Avatar
    Join Date
    Aug 2001
    Location
    Kent, Ohio
    Posts
    367
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can do this with:

    Redirect /reviews.php http://www.site.com/modules.php

    But I'm not sure if the variables will get carried over.

    Why can't you just put

    header("Location: modules.php?name=Reviews&rop=$whatver");

    in reviews.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
  •