SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2008
    Posts
    66
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Adding a redirect?

    Hello,

    I have a folder and all of the html files (more than 50) have been moved and copied over to another folder in a different location.

    I want to make it so that if somebody tries accessing any of the files in their old location, they are automatically brought to the same menu.htm page.

    Is there something that I can add to that specific old folder - saying that if somebody comes here redirect them to the new menu.htm page? I want to make it folder-specific, because I have lots of folders.

    Thanks for your help with this.

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It depends on which web server you're using and what permissions you have on it. If you're using Apache and have access to mod_rewrite you can use rewrite expressions in a .htaccess file in that folder (or the root folder).

    If you're on a shared host you may need to check with your hosting provider first.

    Search for mod_rewrite in your favourite search engine to find out how to do it, or post a question in our Apache Configuration forum. (Search there first, it's more than likely that this question has been answered already.)
    Birnam wood is come to Dunsinane


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
  •