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.

htaccess issue.. is the another way?

Discussion in 'Apache' started by Fiverscripts, Jun 14, 2015.

  1. #1
    Forgive me.. bit new to the htaccsess writing like this.. but basically i have a php script that requires an installer

    so im writing (or rather trying to) a simple htaccsess file.. that basically redirects users to:

    mydomain.com/installer and once this has been deleted just default to standard root/index

    this is what i have so far:

    Options +FollowSymLinks
    RewriteEngine On
    
    RewriteCond %{DOCUMENT_ROOT}/installer -d
    RewriteCond %{REQUEST_URI} !(installer) [NC]
    RewriteRule ^(.*) /installer [L,redirect=302]
    
    Code (ApacheConf):
    this seems to work ok.. but unfortunately on the simple installer index page is 2 images and the images don't work.. what am i doing wrong?
     
    Solved! View solution.
    Last edited: Jun 14, 2015
    Fiverscripts, Jun 14, 2015 IP
  2. 2WDH.com

    2WDH.com Active Member

    Messages:
    143
    Likes Received:
    3
    Best Answers:
    5
    Trophy Points:
    68
    #2
    Hi Laverack1.

    Are those images located in /installer folder?
     
    2WDH.com, Jun 22, 2015 IP
  3. Fiverscripts

    Fiverscripts Moderator Staff

    Messages:
    1,839
    Likes Received:
    42
    Best Answers:
    1
    Trophy Points:
    370
    #3
    Nope they are located.. one directory back and like 2 directory back in? so like this:

    root > Installer > index.php
    root > Media > images > 2 x images here
     
    Fiverscripts, Jun 23, 2015 IP
  4. #4
    I suppose that is the reason. I.e. requests to those images are being redirected to /installer folder as well.
    So you have to either put the images into installer folder as well or add an exception to your .htaccess rewrite rules.
     
    2WDH.com, Jun 23, 2015 IP
    Fiverscripts likes this.
  5. Fiverscripts

    Fiverscripts Moderator Staff

    Messages:
    1,839
    Likes Received:
    42
    Best Answers:
    1
    Trophy Points:
    370
    #5
    hmm never thoght of it like that.. that would explain things.. going to test that theory inamo!

    EDIT: all confirmed working now i moved images to same folder.. thanks for your help
     
    Last edited: Jun 24, 2015
    Fiverscripts, Jun 23, 2015 IP