Results 1 to 7 of 7

Thread: redirect with htaccess

  1. #1
    Registered
    Join Date
    Nov 2003
    Posts
    25

    Question redirect with htaccess

    I would like to delet one of my page but redirect the traffic to the new page. But my old page name has a space in it and I can't seem to get the redirect to work.

    Is there a way to compensate for the space without actually having it?

    Thanks for any help.

  2. #2
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,055
    You could just put some redirect code in the file itself and not worry about .htaccess.
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

  3. #3
    Registered
    Join Date
    Nov 2003
    Posts
    25
    code it in javascript

  4. #4
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,055
    Or with PHP.
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

  5. #5
    Registered Member incka's Avatar
    Join Date
    Aug 2003
    Location
    Wakefield, UK, EU
    Posts
    3,801
    I'm interested... What .htaccess code would I use?

  6. #6
    Registered
    Join Date
    Nov 2003
    Posts
    67
    I've encountered this problem myself before. I created a php page as a place holder and did a 301 redirect to the homepage.

  7. #7
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,055
    Here are two ways to do it.

    Redirect 301 /folder/script.php http://www.yournewsite.com/folder2/script2.php

    Or...

    RedirectMatch 301 ^(.*)$ http://www.yournewdomain.com$1

    The second example will redirect all files from one domain to equivalent files on a new domain. So

    domain1.com/page.php

    becomes

    domains2.com/page2.php
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

Similar Threads

  1. redirect a to website
    By ronp in forum General Management Issues
    Replies: 2
    Last Post: 04-08-2004, 11:54 PM
  2. Redirect
    By k0r54 in forum HTML, CSS, Layout, and Design
    Replies: 3
    Last Post: 03-28-2004, 03:40 PM
  3. redirect url?
    By bongie in forum Domain Names
    Replies: 6
    Last Post: 02-05-2004, 01:40 PM
  4. need to exclude one page from a general .htaccess redirect
    By Apollo in forum General Management Issues
    Replies: 1
    Last Post: 01-10-2004, 01:56 PM
  5. Redirect
    By lemon in forum Search Engine Optimization
    Replies: 1
    Last Post: 09-09-2003, 12:47 PM

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
  •