0

My subdomain is http://forma.culturadigital.cc

I have tried the following (from the apache documentation):

<Directory /kunden/homepages/21/d460086828/htdocs/forma/es>
FallbackResource /forma/es/index.php
</Directory>

But i get a 500 internal server error.

Also tried simply:

FallbackResource /forma/es/index.php

Which doesn't give an error but doesn't catch wrong url's either.

Note: I have succesfully setup a fallbackResource for the main domain already, like this:

FallbackResource /es/index.php

The problem thus, is when trying to make it work in a subdomain.

5
  • How have you defined your virtual hosts? This would be helpful to know which is the best case for handling this in another way.
    – rekire
    Sep 6, 2013 at 21:47
  • i hardly know what a vhost is.. my host is 1and1.es and i haven't seen any .config files in my ftp.. should i try to access this file? im pretty lost Sep 6, 2013 at 21:50
  • Do you use the same directory for multiple subdomains?
    – rekire
    Sep 6, 2013 at 21:57
  • no, the folder /forma is only assigned to the subdomain forma.culturadigital.cc Sep 6, 2013 at 21:58
  • 1
    In that case try to obmit the relative part from your ftp root use the /forma path as root. Basically try using FallbackResource es/index.php. Check also if you have a error.log that file may contain helpful informations.
    – rekire
    Sep 6, 2013 at 22:01

2 Answers 2

1

After you told in the comments that the folder /forma is only assigned to the subdomain forma.culturadigital.cc you should try to obmit the relative part from your ftp root use the /forma path as root. Basically try using:

FallbackResource es/index.php

You could also check if you have a error.log that file may contain helpful informations.

1

You can't have a <Directory> container in an htaccess file. What you should do is create an htaccess file in the /kunden/homepages/21/d460086828/htdocs/forma/es directory and put this in it:

FallbackResource /forma/es/index.php

Well, if this is applied specifically to a particular hostname, may as well just use mod_rewrite:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^ /forma/es/index.php [L]
3
  • thx, didnt know that, but i have tried your suggestion already and it doesnt work for my subdomain (forma.culturadigital.cc) It does work for the folder though (culturadigital.cc/forma) but i need it to work on the subdomain Sep 6, 2013 at 21:39
  • @fartagaintuxedo can't do that with FallbackResource, but you can do something similar with mod_rewrite (see above)
    – Jon Lin
    Sep 6, 2013 at 22:08
  • what @rekire has suggested works for me.. at least so far - not having tested it thouroughly but it does look good i think Sep 6, 2013 at 22:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.