The redirect
Redirect /css /demo/myDemoApp/css
on the htaccess shuld work if the configuration allow redirects on httacess.

Also the relative form is with out the first "/", if it begins with
"/" is absolute (to the server)

2010/8/3 Gustavo Adrian <comfortablynum...@gmail.com>:
> Thanks for your reply Luciano!
>
> Sadly, it doesn't work in either way. The problem seems to be the relative
> path I used on every asset: for example, instead of "css/style.css" I used
> "/css/style.css".. so it looks on the "root" folder for the asset. I tried
> removing the first slash on one css file to try it on and it "worked" (it
> pointed to "demos/myDemoApp/es/css/style.css" .. it included the /es/
> because of the culture on the URL, I don't know why). As I mentioned early,
> I used this type of relative path because using "css/style" didn't work,
> even on the main domain (maybe using "RewriteBase /" would work in this
> way?).
> So.. I give up. I was trying to make it work on a subdirectory on a shared
> hosting I have, but it seems that the only way is using a Virtual Host, so
> I'll have to migrate my app to a VPS.
>
> Thanks for all your help guys!
>
>
> On Tue, Aug 3, 2010 at 3:35 PM, Luciano A. Andrade
> <andrade.luci...@gmail.com> wrote:
>>
>> you can try to set
>> sfConfig::set('sf_web_css_dir_name', "demo/myDemoApp/css");
>>
>> which may not work if the stylesheet is set with the full path (check
>> the stylesheet_path helper function)
>>
>> if you try to change the .htacces, you shuld change the RewriteBase
>> and probably a simple Alias shuld work out.
>>
>> Alias /css /demo/myDemoApp/css
>>
>> but you my not be able to set this on an htaccess file, a redirect my also
>> work
>>
>> Redirect /css /demo/myDemoApp/css
>>
>>
>> 2010/8/3 Gustavo Adrian <comfortablynum...@gmail.com>
>> >
>> > Hi,
>> > Here is ProjectConfiguration.class.php: http://pastebin.com/fEhCWbf8
>> > And here the .htaccess: http://pastebin.com/cFQHfKwJ
>> > I created a symlink to public_html. Everything works like before, and I
>> > have the same problem. With Firebug I notice that the browser, for example,
>> > looks for the css assets at: www.mainDomain.com/css when it should be
>> > www.mainDomain.com/demo/myDemoApp/css
>> > NOTE: I tried with RewriteBase commented out and with RewriteBase
>> > /demos/myDemoApp like it's in the pastebin example. It doesn't work in
>> > either way.
>> >
>> > Thanks!
>> >
>> > On Tue, Aug 3, 2010 at 11:39 AM, Anibal Sólon <anibalso...@gmail.com>
>> > wrote:
>> >>
>> >> You can paste (http://pastebin.com/) the .htaccess and
>> >> projectConfiguration.class.php file? Dont think that is the .htaccess
>> >>
>> >> On Tue, 2010-08-03 at 00:24 -0300, Gustavo Adrian wrote:
>> >>
>> >> Finally I did it from with a cron, but it didn't work. Is there a way
>> >> to configure the .htaccess file to make the trick?
>> >>
>> >>
>> >>
>> >> Thanks
>> >>
>> >> On Mon, Aug 2, 2010 at 11:34 PM, Anibal Sólon <anibalso...@gmail.com>
>> >> wrote:
>> >>
>> >> You can make it with PHP!
>> >>
>> >> It's a hard, but functional, way: http://php.net/symlink
>> >>
>> >>
>> >> On Mon, 2010-08-02 at 19:00 -0300, Gustavo Adrian wrote:
>> >>
>> >> First of all, thanks for your reply!
>> >>
>> >>
>> >> The problem of creating a symlink comes from the fact that I have a
>> >> shared hosting. Is there a way of doing this on a shared hosting without 
>> >> ssh
>> >> access?.
>> >>
>> >>
>> >> Anyway, remember that my app is working 100%. My problem lies in the
>> >> place where my app looks for the assets. I think it has to be a way to fix
>> >> this from .htaccess and I thought that using "RewriteBase 
>> >> /demos/myDemoApp"
>> >> would work but it didn't. It still looks on the main domain for my assets
>> >> (For ex: www.maindomain.com/css/style.css) when it should look for them on
>> >> www.maindomain.com/demo/myDemoApp/css/style.css.
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> Thanks!
>> >>
>> >> On Mon, Aug 2, 2010 at 5:14 PM, Luciano A. Andrade
>> >> <andrade.luci...@gmail.com> wrote:
>> >>
>> >> The easy way to do this is with a symlink from public_html to web (on
>> >> your symfony proyect) symlink will work if apache is correctly configured,
>> >> ie, followsymlink is active.
>> >>
>> >> Other easy option is change the way the front controller loads the
>> >> config, just put every thing from your web directory in public_html and
>> >> change the relative path that includes the configuration
>> >>
>> >> on sf 1.0 it means change the line
>> >> define('SF_ROOT_DIR',    realpath(dirname(__FILE__).'/..'));
>> >>
>> >> on sf 1.2 (or 1.1 don't remember) to change the following line
>> >>
>> >> require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php');
>> >>
>> >> on the files you use to access your sf app usually frontend.php /
>> >> frontend_dev.php / index.php / admin.php / admin_dev.php ...etc.
>> >> 2010/8/2 Gustavo Adrian <comfortablynum...@gmail.com>
>> >>
>> >> Anyone?
>> >>
>> >>
>> >>
>> >>
>> >> On Fri, Jul 30, 2010 at 1:13 PM, Gustavo Adrian
>> >> <comfortablynum...@gmail.com> wrote:
>> >>
>> >> Hi all,
>> >>
>> >>
>> >> This is a topic I've been avoiding for a long time but now I need to
>> >> deploy my app on a subdirectory and there's no other option. IMPORTANTE:
>> >> It's on a SHARED HOSTING.
>> >>
>> >>
>> >> The app dir structure now is something like this:
>> >>
>> >> /
>> >> /demos
>> >>   /myAppSymfonyFiles
>> >>     /app
>> >>     /cache
>> >>     /config
>> >>     /data
>> >>     /lib
>> >>     /plugins
>> >> /public_html
>> >>   /demos
>> >>     /myDemoApp
>> >>
>> >>
>> >>
>> >>
>> >> So, the public dir, as you may guessed, is "public_html". Under
>> >> /demos/myDemoApp I have the contents of the "web" dir of Symfony. on
>> >> "myAppSymfonyFiles" I've put the other Symfony dirs so they're private.
>> >>
>> >>
>> >> I've changed successfully the webDir from
>> >> projectConfiguration.class.php and I've changed the path to this file on 
>> >> the
>> >> front controller as well. Everything works EXCEPT.. that it looks for 
>> >> every
>> >> asset on the MAIN domain like:
>> >>
>> >> www.mainDomain.com/css/style.css
>> >>
>> >> When it should be..
>> >>
>> >> www.mainDomain.com/demos/myDemoApp/css/style.css
>> >>
>> >>
>> >> I tried to change the .htaccess from RewriteBase / to RewriteBase
>> >> /demos/myDemoApp with no success.
>> >>
>> >>
>> >> Anyone knows what I'm missing?
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> Thanks!
>> >>
>> >> --
>> >> If you want to report a vulnerability issue on symfony, please send it
>> >> to security at symfony-project.com
>> >>
>> >> You received this message because you are subscribed to the Google
>> >> Groups "symfony users" group.
>> >> To post to this group, send email to symfony-users@googlegroups.com
>> >> To unsubscribe from this group, send email to
>> >> symfony-users+unsubscr...@googlegroups.com
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/symfony-users?hl=en
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> If you want to report a vulnerability issue on symfony, please send it
>> >> to security at symfony-project.com
>> >>
>> >> You received this message because you are subscribed to the Google
>> >> Groups "symfony users" group.
>> >> To post to this group, send email to symfony-users@googlegroups.com
>> >> To unsubscribe from this group, send email to
>> >> symfony-users+unsubscr...@googlegroups.com
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/symfony-users?hl=en
>> >>
>> >>
>> >>
>> >> --
>> >> If you want to report a vulnerability issue on symfony, please send it
>> >> to security at symfony-project.com
>> >>
>> >> You received this message because you are subscribed to the Google
>> >> Groups "symfony users" group.
>> >> To post to this group, send email to symfony-users@googlegroups.com
>> >> To unsubscribe from this group, send email to
>> >> symfony-users+unsubscr...@googlegroups.com
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/symfony-users?hl=en
>> >>
>> >>
>> >> Anibal Sólon
>> >>
>> >> --
>> >> If you want to report a vulnerability issue on symfony, please send it
>> >> to security at symfony-project.com
>> >>
>> >> You received this message because you are subscribed to the Google
>> >> Groups "symfony users" group.
>> >> To post to this group, send email to symfony-users@googlegroups.com
>> >> To unsubscribe from this group, send email to
>> >> symfony-users+unsubscr...@googlegroups.com
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/symfony-users?hl=en
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> If you want to report a vulnerability issue on symfony, please send it
>> >> to security at symfony-project.com
>> >>
>> >> You received this message because you are subscribed to the Google
>> >> Groups "symfony users" group.
>> >> To post to this group, send email to symfony-users@googlegroups.com
>> >> To unsubscribe from this group, send email to
>> >> symfony-users+unsubscr...@googlegroups.com
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/symfony-users?hl=en
>> >>
>> >> Anibal Sólon
>> >>
>> >> --
>> >> If you want to report a vulnerability issue on symfony, please send it
>> >> to security at symfony-project.com
>> >>
>> >> You received this message because you are subscribed to the Google
>> >> Groups "symfony users" group.
>> >> To post to this group, send email to symfony-users@googlegroups.com
>> >> To unsubscribe from this group, send email to
>> >> symfony-users+unsubscr...@googlegroups.com
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/symfony-users?hl=en
>> >
>> > --
>> > If you want to report a vulnerability issue on symfony, please send it
>> > to security at symfony-project.com
>> >
>> > You received this message because you are subscribed to the Google
>> > Groups "symfony users" group.
>> > To post to this group, send email to symfony-users@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > symfony-users+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> > http://groups.google.com/group/symfony-users?hl=en
>>
>> --
>> If you want to report a vulnerability issue on symfony, please send it to
>> security at symfony-project.com
>>
>> You received this message because you are subscribed to the Google
>> Groups "symfony users" group.
>> To post to this group, send email to symfony-users@googlegroups.com
>> To unsubscribe from this group, send email to
>> symfony-users+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/symfony-users?hl=en
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to