Results 1 to 4 of 4
  1. #1
    Pimp Duck popdawg's Avatar
    Join Date
    January 18th, 2005
    Location
    Take off eh?
    Posts
    3,249
    Apache 301 Permanent Redirect Issue
    Hey all,
    Can anyone tell me why this wouldn't work:
    rewriteRule ^test\.php$ h/t/t/p://www/.domain.com/newpage.php [R=permanent,L]
    The items are in the same directory.
    Also, is there a limit to how many of these you can use ... I am changing about 450 pages and need to redirect them all permanently.

    Thanks

    btw ... replace h/t/t/p with http and www/.domain with www.domain Tried to get it to look the same
    ================================================================
    Been away, now I'm back. Not as much, but I'm back & starting from scratch. Where I was, was fantastic. Where I am now, less so. Things have changed, become harder. So have I. Game ON!!!
    ================================================================

  2. #2
    ABW Ambassador MoneyBusiness's Avatar
    Join Date
    March 14th, 2006
    Posts
    2,051
    What if you tried:

    rewriteRule ^test\([^/]+).php$ h/t/t/p://www/.domain.com/newpage.php [L]

    Where the main change is adding: ([^/]+) between your slash and .php. This way, it catches anything between those characters (even though you're not doing anything with it).

    Dunno if it works - it's close to how I have mine set up right now, like:

    RewriteRule ^categories/([^/]+)-products.html$ /products.html?val=$1 [L]

  3. #3
    Lite On The Do, Heavy On The Nuts Donuts's Avatar
    Join Date
    January 18th, 2005
    Location
    Winter Park, FL
    Posts
    6,930
    You said "I am changing about 450 pages and need to redirect them all permanently."

    Are all 450 pages going to one new page?
    -or-
    Are you trying to send 450 old pages forward to 450 new pages?

    If you are doing 450 to 450, I'm guessing you may have setup 450 of these rules setup... if so, only the last one has an "L" at the end. The "L" in "[R=permanent,L]" means Last and tells your rewrite engine to ignore any rules that follow cuz you've indicated the last rule has been reached. If you have a stack of rewrites (the 450 to 450 I'm imagining), you need to remove the L's from all but the last one.

    If they're all going to one... or if you're still having trouble... I think you can use "code" in square brackets so we can see your exact code and help you further.

    Like [sarcasm]really[/sarcasm] kind of thing, but code instead of sarcasm. :-)

    Code:
    does code in brackets work... http://www.yomama.com/redirects.php

  4. #4
    Pimp Duck popdawg's Avatar
    Join Date
    January 18th, 2005
    Location
    Take off eh?
    Posts
    3,249
    Works ... thanks guys.

    On a completely related unrelated note, spaces in htaccess are a pain. found it tho
    ================================================================
    Been away, now I'm back. Not as much, but I'm back & starting from scratch. Where I was, was fantastic. Where I am now, less so. Things have changed, become harder. So have I. Game ON!!!
    ================================================================

  5. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. 301 redirect to shorten affiliate links?
    By GoColts in forum Newbie Affiliate FAQs & Helpful Articles
    Replies: 8
    Last Post: June 30th, 2008, 01:49 PM
  2. 301 redirect
    By martinsbca in forum WebMerge (Fourthworld.com)
    Replies: 0
    Last Post: February 27th, 2007, 05:05 PM
  3. 301 redirect using htaccess question
    By ~Michelle in forum Midnight Cafe'
    Replies: 5
    Last Post: February 26th, 2006, 09:16 PM
  4. .htaccess & 301 Redirect
    By ~Michelle in forum Search Engine Optimization
    Replies: 2
    Last Post: March 11th, 2005, 12:18 PM
  5. Apache Redirect - Need Help
    By Greg Rice in forum Programming / Datafeeds / Tools
    Replies: 4
    Last Post: May 4th, 2004, 04:22 PM

Posting Permissions

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