Rewriting URLs

Discussion in 'Web Design and Development' started by dmmcintyre3, Aug 10, 2009.

  1. dmmcintyre3 macrumors 68020

    Joined:
    Mar 4, 2007
    #1
    I would like to make /~dmmcintyre3/(rest of the url) on my server show /photos/(rest of the url) in the address bar.

    I am using the Mac OS X 10.5.8 default apache with PHP, .htaccess in the folder enabled and mysql installed.
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    From the .htaccess file,
    Code:
    RewriteEngine On
    RewriteRule ^~dmmcintyre3/(.*)$ /photos/$1
    I think this will work.
     

Share This Page