1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Mod rewrite/capitalisation issue.

Discussion in 'Programming' started by THT, Dec 29, 2005.

  1. #1
    Im having trouble with this - cant get my head around the bets way to to do this.


    I want to add a mod rewrite so that if someone requests /Blog they actually get /blog

    This must also work with deep urls too :

    /Blog/fishmonger-eats-goat.htm should redirect to /blog/fishmonger-eats-goat.htm

    can someone just give me the htaccess syntax pls?

    Thanks
     
    THT, Dec 29, 2005 IP
  2. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #2
    Redirect....

    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^Blog/([^.]+)\.htm$ http://www.domain.com/blog/$1.htm [R=301,L]

    Just make the other URL work....

    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^blog/([^.]+)\.html$ Blog/$1.htm [L]
     
    Nintendo, Dec 29, 2005 IP
  3. THT

    THT Peon

    Messages:
    686
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks king of mod_rewrite :)
     
    THT, Dec 29, 2005 IP