.htaccess url rewrite

Discussion in 'Installation/Configuration' started by u4david, Jan 30, 2010.

  1. u4david

    u4david New Member

    I have domain
    in the web root of this domain I have subdirectory.

    I have redirected the domain to go straight in that subdirectory.
    Using the redirect option in the ispconfig3 domain set up/no flag.

    I have installation of web application an need to configure it (phpGedview Component Settings).
    The configuration requires to enter the location of the application.

    Using relative format in this case:

    And then the configuration automatically creates absolute path based on the relative location for other aspect of this component to work.

    But the absolute poth in real time is:

    So I get errors that server can not find /var/www/domain/application/executable
    because it is really in /var/www/domain/subdirectory/application/executable
    can i use some sort of url rewrite to fix this issue with absolute path?
    so when is redirected in to the subdirectory automatically it will also rewrite the url with the sub domain?
    Or what would be the proper approach to this?

    Thank you.

    BTW: did I mention that I love ISPconfig3!Try your dns with ISPconfig3 it is fast and configuration changes are almost instant compare to isp (6hr to 48hrs).( I highly recommend netfirms for domain management)
    Last edited: Jan 30, 2010
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Remove the subdomain and then create a new website (domain) for the subdomain if a subdomain shall have its own directory.
  3. u4david

    u4david New Member

    Not a subdomain

    not sub-domain.

    but subdirectory in the web root.

    Instead of typing:

    I have directed the domain straight in the subdirectoryinwebroot
    so when you type:

    it automatically goes to that subdirectory.
    Basically using redirection in the Ispconfig3/no flag, I kid-of stepped the web root one subfolder down the tree.
    But I need to use some sort of url rewrite to reflect this in the url so it actualy shows its self in URL the way it really is.
    (so when you go to http://domain it will get rewrite in the address bar to http://domain/subdirectory) and I think it will also fix the absolute path.
    .htaccess I think should have some rewrite in it to do so.

    It have its purpose to keep thing organised in the web root .

    Not a sub-domain question do not confuse that.
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    This was not a good decision as this means that you can not install any software into this subdirectory that uses .htaccess files or rewrite rules like most cms systems do as the rewrite rules in the .htaccess file will conflict then with the rewrite rules used to redirect the domain to the subdirectory.

    The best solution is to remove the subdirectory and install the application directly into the web root.
  5. u4david

    u4david New Member

    i have no problem with installing cms

    coze the cms thinks that the subdirectory is the web root.

    all I try to fix is to rewrite the url to what is in real time.

    there is no other .htaccess

    btw: where is the config file that is connected with the domain rewrites option in ISPconfi3/no rewrite or no flag or R or L or L,R?
  6. u4david

    u4david New Member

Share This Page