Rewrite static to static using .htaccess? helppppppp

Discussion in 'Apache' started by m0rtal, May 29, 2006.

  1. #1
    Is something like that possible?
    To rewrite a static url to another static url, I don't know much about htaccess but would it be somethin along these lines?

    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^ /(newdirectory)/(newdirectory)/(newfile.php)$ /whaaat goes here??

    Thanks :)
     
    m0rtal, May 29, 2006 IP
  2. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #2
    Post URLs, an old and new URL.
     
    Nintendo, May 29, 2006 IP
  3. m0rtal

    m0rtal Well-Known Member

    Messages:
    1,548
    Likes Received:
    121
    Best Answers:
    0
    Trophy Points:
    180
  4. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #4
    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^myspace\-([^.]+)$ graphics/$1 [L]
     
    Nintendo, May 29, 2006 IP
  5. m0rtal

    m0rtal Well-Known Member

    Messages:
    1,548
    Likes Received:
    121
    Best Answers:
    0
    Trophy Points:
    180
    #5
    Hmm, see there is more than one directory under graphics, as I understand this would turn all directories under graphics into myspace-directory, am I correct?
     
    m0rtal, May 29, 2006 IP
  6. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #6
    ([^.]+) and $1 would be the same stuff in the old and new URL.
     
    Nintendo, May 29, 2006 IP
    m0rtal likes this.
  7. m0rtal

    m0rtal Well-Known Member

    Messages:
    1,548
    Likes Received:
    121
    Best Answers:
    0
    Trophy Points:
    180
    #7
    Ok thanks bud...i'm thinkin i might just change it manually now though because I'm not sure what effect it would have on SE rankings if links were to the first url and then the url was rewritten.
     
    m0rtal, May 30, 2006 IP