HELP: Redirection with ispconfig

Discussion in 'General' started by dscreation, Jul 4, 2014.

  1. dscreation

    dscreation New Member

    Hello,
    I want to redirect automacally http://www.caplangues.pro/crm/ to http:/www.caplangues.pro/crm/htdocs/

    How to do that with ispconfig?

    I have try:

    Redirect /crm/ /crm/htdocs/

    in Directives Apache (ispconfig console / website/options), but it's doesn't work.


    Thanks in advance.


    Sam
     
    Last edited: Jul 4, 2014
  2. srijan

    srijan New Member HowtoForge Supporter

    Hi

    you can do it through ISPConfig web interface.

    There are two redirection possibilities.

    redirect to an other domain
    Just set the type to "no flag" and the path to "http://www.myotherdomain.com".
    redirect to a subfolder
    Let's say you have www.example.com as a domain and you do not want to use the /web/ folder but the /web/exfolder/ for your data.
    visible redirect
    Choose R or R,L as type and enter /exfolder/ into the path field. Anyone calling www.example.com will be redirected to www.example.com/exfolder/ and this will be visible in the browser's address bar
    hidden redirect
    Choose no flag or L as type and enter /exfolder/ into the path field. It works the same as above with the difference that the user will still see www.example.com in the address bar.
     
  3. dscreation

    dscreation New Member

    Thanks srijan,

    But the problem with your answer is that it's all the domain wich is redirected.

    I want redirect only www.caplangues.pro/crm/ to www.caplangues.pro/crm/htdocs/

    On my server, I have different website:
    The main website will be www.caplangues.pro/cms/ (www.caplangues.pro will be redirected to the directory /cms/)
    Other websites:
    /crm/ (my actual problem)
    /lms/ (futur website)

    When I was on a different hosting, I used an htaccess file and it worked:
    RewriteEngine On
    RewriteCond %{SERVER_PORT} 80
    RewriteCond %{REQUEST_URI} /crm/
    RewriteRule ^(.*)$ http://www.caplangues.pro/crm/htdocs/$1 [R,L]

    But on my actual hosting, it doesn't work, I don't know why!!!!

    I think that ispconfig can only redirect a domain or subdomain but not a directory.

    A friend say me to use Apache Directives in ispconfig (website/options/Apache Directives), but I don't know the correct Apache Directives.
     
    Last edited: Jul 4, 2014
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You can use the same .htaccess file in ispconfig as well or copy the rules in the apache redirect field, which has basically the same effect.
     

Share This Page