Activity Stream
48,167 MEMBERS
6844 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 9 of 9
  1.     
    #1
    Member
    Website's:
    PornShareProject.org MidnightDesires.org

    Default .htaccess - rotate image url?

    Is it possable to use .htaccess to rotate image using the same URL?


    For exmaple:
    domain.com/random.jpg


    Redirect to randomly:
    domain.com/image1.jpg
    domain.com/image2.jpg
    domain.com/image2.jpg
    AlternativeWeb Reviewed by AlternativeWeb on . .htaccess - rotate image url? Is it possable to use .htaccess to rotate image using the same URL? For exmaple: domain.com/random.jpg Redirect to randomly: domain.com/image1.jpg domain.com/image2.jpg Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Why with an htacces file, PHP can do the job much easier?

  4.     
    #3
    Member
    Indeed it would be easier if you use a php script for it.

    Just make a folder called random.jpg and place the script alongside with the images there and it would get rotated.

    Super busy. I have to forward this email to 20 people in 5 minutes or else a ghost will visit me tonight and my room is a mess

  5.     
    #4
    Member
    Website's:
    PornShareProject.org MidnightDesires.org
    I actually wanted to make it for the default avatar images for my forum.
    So it would need to be an actual URL instead of a php script.

  6.     
    #5
    Member
    Website's:
    LulzCovers.com LulzTroll.com
    its simple using php.
    use rand() function to get a value.
    check for random value against your desired number or range.
    redirect if it meets the requirement.

    edit:
    you can use htaccess rewrite rule
    like RewriteRule ^/img.jpg ./random.php
    Contact me for Traffic, SEO, WCDDL, Wordpress, IPB related Services or queries.
    Template Designing, PSD to HTML, Wordpress


  7.     
    #6
    Member
    Website's:
    PornShareProject.org MidnightDesires.org
    And this would work on avatars?

    I'm not too sure if this will actually load, would it?

  8.     
    #7
    Member
    Website's:
    imdber.org justpaste.me
    ^Why not try it. Change the header so the script can display the image:

    PHP Code: 
    header('Content-Type: image/' $filetype); 

  9.     
    #8
    Member
    Website's:
    PornShareProject.org MidnightDesires.org
    I don't really know anything about server side coding, but I'll look in to it.
    Thanks for your tips.

  10.     
    #9
    Member
    Quote Originally Posted by AlternativeWeb View Post
    I actually wanted to make it for the default avatar images for my forum.
    So it would need to be an actual URL instead of a php script.
    Quote Originally Posted by Qoo View Post
    Indeed it would be easier if you use a php script for it.

    Just make a folder called random.jpg and place the script alongside with the images there and it would get rotated.
    If you followed this method you could just copy the link to your url - http://yourdomain.com/random.jpg and your avatar would rotate just fine. You don't need to link it to your php file but make sure in the folder named "random.jpg" you place the php file named "index.php". This way your avatar would load just fine.

    Super busy. I have to forward this email to 20 people in 5 minutes or else a ghost will visit me tonight and my room is a mess

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. .htaccess - Leverage browser caching image
    By torrfriend in forum Technical Help Desk Support
    Replies: 0
    Last Post: 6th Oct 2012, 02:24 PM
  2. Rotate banner in Blogspot??
    By arnav in forum Web Development Area
    Replies: 7
    Last Post: 2nd May 2012, 01:30 AM
  3. Ads exchange and auto rotate
    By nICEsHARE in forum Webmaster Discussion
    Replies: 0
    Last Post: 16th Dec 2011, 06:26 AM
  4. How to rotate multi Images like Trump card effect
    By torrfriend in forum Technical Help Desk Support
    Replies: 6
    Last Post: 15th Nov 2011, 07:08 AM
  5. [PHP] imageBox V1 (Text,Rotate,Watermak,Resize)
    By litewarez in forum Webmaster Resources
    Replies: 16
    Last Post: 15th Feb 2011, 07:32 PM

Tags for this Thread

BE SOCIAL