.htaccess pretty URL question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rastan
    Master(bater)
    • Aug 2010
    • 913

    #1

    .htaccess pretty URL question

    I need some rewrite help from a kind soul.

    Okay, so I've got a domain with stuff on, and I want to refresh it with NEW stuff
    So I set my stuff up in a subfolder /v2 and get everything working fine in there.
    Now I wand to switch things over.
    I can do simple 301/302 redirects to point the traffic to the new folder, but IDEALLY what I want is for stuff like

    http://mydomain.com/v2/index.php to be read by browsers as
    http://mydomain.com/index.php

    removing the /v2/ from the URLs.
    Im sure there's a rewrite pattern that can get that working

    I've tried a couple of solutions I found on stack overflow but nothings hit the spot yet.
    Rob | Britsexcash.com | @splatbukkake | Skype: BritSexCash
  • dunhill
    Confirmed User
    • Jul 2013
    • 89

    #2
    RewriteRule ^(.*)?$ /v2/$1 [L]

    Comment

    • rastan
      Master(bater)
      • Aug 2010
      • 913

      #3
      thx man, will try it
      Rob | Britsexcash.com | @splatbukkake | Skype: BritSexCash

      Comment

      Working...