SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: redirect

  1. #1
    is not my name biggdesign's Avatar
    Join Date
    Apr 2005
    Location
    Station 43
    Posts
    289
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    redirect

    hey guys, quick question.

    how do i make a domain.com/page/file/xxx.htm redirect to domain.com

    ive managed to make domain.com/page redirect to root, but is it possible to make the files/stuffs under ../page redirect?

    Much thanks.
    stay hungry, stay foolish.

  2. #2
    SitePoint Wizard chris_fuel's Avatar
    Join Date
    May 2006
    Location
    Ventura, CA
    Posts
    2,751
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When you say , redirect, this is the HTML/XHTML forum, so there really isn't any way to redirect given that scope. Now, if you're using php:

    PHP Code:
    header("Location: /"); 
    works just nicely. If you're just linking:

    HTML Code:
    <a href="/">Link</a>

  3. #3
    is not my name biggdesign's Avatar
    Join Date
    Apr 2005
    Location
    Station 43
    Posts
    289
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    maybe an example would help u help me better

    http://www.thatplaysite.com/play/games/Spank-The-Monkey
    link above doesnt work cos ive moved folder /play to root.

    what i wanna know is how to make http://www.thatplaysite.com/play/games/Spank-The-Monkey, and ALL files under /play/xxx/xxxxx redirect to root.
    stay hungry, stay foolish.

  4. #4
    SitePoint Wizard chris_fuel's Avatar
    Join Date
    May 2006
    Location
    Ventura, CA
    Posts
    2,751
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think what you're looking for is mod_rewrite. There's a sitepoint article on it here:

    http://www.sitepoint.com/article/guide-url-rewriting


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
  •