Results 1 to 2 of 2
  1. #1

    How to map an URL to a file(not folder) with .htaccess~??

    I am trying to map an URL to a specific picture on my account.

    My hosting supports .htaccess and I am able to point to folders and whatnot... but I dont know how to point to a FILE such as a picture/jpeg,gif, etc

    My website is chartest.comxa.com (free webhosting)

    As soon as chartest.comxa.com is entered, I want it to go to chartest.comxa.com/uploadz/a1.jpg

    I also need this at the top of my htaccess file "RewriteBase /" because ********** says "We use virtual user home directory paths, so you may get errors when trying to set up search engine friendly URL's"

    Is this possible~???


    Thanks

  2. #2
    Try sth like this - not sure if this will work cause dont have much time to test
    Code:
    #RewriteCond %{REQUEST_FILENAME} !-f  #add this two above if rewrite rule will not work
    #RewriteCond %{REQUEST_FILENAME} !-d
    
    RewriteRule ^(.*)$ /uploadz/a1.jpg[L]

Similar Threads

  1. Redirect old url to new url using .htaccess
    By mickscool in forum Hosting Security and Technology
    Replies: 3
    Last Post: 06-06-2009, 07:47 PM
  2. Possible to apply .htaccess to only one folder?
    By Funkadelic in forum Hosting Security and Technology
    Replies: 3
    Last Post: 12-19-2007, 10:02 PM
  3. Redirect from one folder to another via .htaccess ?
    By Joel Theodore in forum Hosting Security and Technology
    Replies: 3
    Last Post: 01-13-2007, 11:37 AM
  4. Map a folder over FTP as a network drive
    By Jamie Edwards in forum Computers and Peripherals
    Replies: 9
    Last Post: 08-08-2006, 06:58 PM
  5. folder locked by .htaccess
    By Oakii in forum Web Hosting Lounge
    Replies: 0
    Last Post: 11-10-2004, 12:18 AM

Posting Permissions

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