symfony routing.yml config for site folders - symfony-1.4

I have symfony web files in web root folder where the project is running. I have site files such as index.html, aboutus.html and contactus.html files. I have put these files into public_html/site/ How to access these files by default using routing.yml? also project should run in index.php

Hm...If you want to add to your project some static pages, I would recommend you this method.I think this is the right way. For index.php ,well read this

Why don't you make a new module for static pages and move the html content into it?
You have to understand that routing system in symfony is used for connect requested urls to controllers. So you can't use it to provide generating urls for static pages outside of your symfony application. That files are just like files of foreign site.
So you can just use link_to('about us', $this->getRequest()->getHost().'/about_us.html');

Related

Hashlocation strategy in angular on top of ASP.net application

I'm currently building a feature angular application on top of an asp.net application. I want the angular module to load on all pages but not interfering with the routing of the asp.net application.
I achieve this by using hashlocation strategy but the problem is that some modules are not found when navigating in the application. The bundels are placed in a folder called "plugins"
For instance
localhost:/foo1 - WORKS
localhost:/foo1/foo2 - One module not found (looks in foo2/plugins folder)
localhost:/foo1/foo2/foo3 - Custom themes not found and module not found (looks in foo2/foo3/plugins)
Is there a way to set the deploy url in angular cli to a relative base folder as to look for files in /plugins disregarding the current url?
Is Static files are allowed in your .net app ?
For example in .net core, be default static files allowed and all files from wwwroot folder you can use in ur application.

Symfony access assets folder

I have some folders in www/web/ which is the root.
It's the following folder: assets/exports/
And it contains a file export.xsl
When I do in javascript:
window.open('/assets/exports/export.xsl');
I'm going to the following link:
http://mywebsite/assets/exports/export.xsl
But I get a: 404 not found
Is symfony somehow protecting this link?
So, my question is, how can I access this file, so it starts downloading for the visitor?
From Symfony Documentation:
Keep in mind that web/ is a public directory and that anything stored here will be publicly accessible, including all the original asset files (e.g. Sass, LESS and CoffeeScript files).
Make sure you put the files in a proper directory: <symfony_root_dir>/web. See below.
Then accessing the http://mywebsite/assets/exports/export.xsl returns the file's content.
Check also your server configuration, virtual host config and read web server configuration guide from Symfony to see if you configured it properly.

Meteor: how to serve images outside the /public folder?

Using Meteor I'm writing a framework that can serve custom themes in the /themes folder. I'd like the images of each theme to stay inside the corresponding theme folder.
From the Meteor documentation:
Lastly, the Meteor server will serve any files under the public
directory, just like in a Rails or Django project. This is the place
for images, favicon.ico, robots.txt, and anything else.
How can I serve images to clients from outside the /public folder?
Well, you have to think of /public as the root folder when Meteor is serving its content.
So if you have content in /public/themes/x.jpg when you are referring your image in HTML you would do something like /themes/x.jpg
If I'm not understanding your question correctly, please tell me so. I will try my best to answer.

asp.net static content in separate project. now how to refer?

Project1.csproj is the website project and StaticContent.csproj is the static content project to hold all .css, .js and image files. I am keeping it separate so that designers can work without touching the main project file and may be use cdn in future. But the problem is how do my .ascx and .aspx pages will refer to these css and js files as that when I run in localhost, it still picks up.
I think the best way is you create a website in IIS for the Static project, and reference it trough something like static.myproject.com (having the appropiate setup) on the other one.
You can still use Webdevserver on Project1.
Is most like what you will have when deploy, and you can put the URL on web.config for easy change

How to configure the flex crossdomain.xml in tipfy

I would like to know how to configure the flex crossdomain.xml in tipfy with the Google app engine skd.
Please advice. Thanks.
Edit:
Tipfy is a framework using in Gae.
I would like to know:
where I can place the crossdomain.xml, in the root or other place,
do I need script to redirect to the xml,
what files that I need to modify, eg. app.yaml.
any other things or file I need to modify or create to make it work.
Thanks.
Place the crossdomain.xml anywhere in your app (eg, the root of the app), then use a static file handler to configure it in app.yaml. You don't need to touch any framework code at all.
If you are using GAE the app url will be typically http://myapp.appspot.com and the Flash player will need a cross domain file from http://myapp.appspot.com/crossdomain.xml. In a Java environment it is as simple as creating this file in web folder of the project, that's it. It will be the same for Python, put this in your app's web root folder, not Google's web server root folder. This worked for me.

Resources