Part time Internet Jobs for All
Are you looking to work from Home? Home based typing positions are now being offered by many Companies at present! Receive your paychecks every month!
Full training provided by the company itself. No Selling Required. Please visit the website http://www.earnparttimejobs.com/index.php?id=965520
Labels: Internet Jobs, Jobs, No investment, Part time Jobs
To disable the default symfony pages like "Symfony Project Created", "Symfony 404 Page Not Found" errors to customized error message, follow the steps
1. In your project root select your application, then open the settings.yml file from config folder.
2. After that enable the selected modules which you want to work, after that edit your settings.yml below .actions as follows.,
default_module: your_module_name
.
.
.
.etc...
3. After that edit your routing.yml file as just change the default module to your_module_name which is mentioned in settings.yml
4. Now Clear the Cache and run your project. You Won't get any symfony pages and error messages.
Hope you will Enjoy.....! :)
If you are defining your schema.yml and have a field that is a decimal value, you will find you will need to somehow pass through the precision (maximum number of digits to the left of the point) and the scale (total number after the decimal point). The documentation for the syntax of this is quite poor.
For all those that want to know, in symfony 1.0 this is how you would define a decimal:
my_decimal: { type: decimal, size: 8,3 }
Here is the solution for rewriting website/backend.php to website/admin and makes the admin area to work.
1. Create a folder "admin" inside "web" folder. Copy here the same .htaccess file and change this line:
RewriteRule ^(.*)$ index.php [QSA,L]
to:
RewriteRule ^(.*)$ ../backend.php [QSA,L]
2. Then go to routing file for backend (app/backend/config/routing.yml) and add folder name to all your routes defined there. Ex:
# default rules
homepage:
url: /admin/
param: { module: default, action: index }
.
.
.
3. Set no_script_name to "on" in your backend settings (app/backend/config/settings.yml) file:
prod:
.settings:
no_script_name: on
4. Clear Cache and now you should be able to get to your backend using: http://mydomian.com/admin/ without problems
Hopes you enjoy...!
To hide the controller name from the URL, when the project is ready for production. Follow the below steps:
- set the no_script_name: to on under prod in settings.yml file from your application directory.
- after that clear the cache.
Now your projects application is ready and your controller name is also hide from the URL.
Labels: Controller, no_scrpt_name, settings.yml
How to get visitors redirected to www.yourdomain.com
Sometimes you dont have domain name but you would like to get your symfony project working. For that just place the .htaccess file from web folder to outside of the project root folder. After that edit the .htaccess file as follows.So, after entering the domain name it will automatically take to the production environment of your project..
RewriteEngine On# uncomment the following line, if you are having trouble
# getting no_script_name to work
#RewriteBase /RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]# we skip all files with .something
RewriteCond %{REQUEST_URI} \..+$
RewriteCond %{REQUEST_URI} !\.html$
RewriteRule .* - [L]# we check if the .html version is here (caching)
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f# no, so we redirect to our front web controller
RewriteRule ^(.*)$ web/index.php [QSA,L]
Enjoy It...! Have a fun... :)
Labels: .htaccess, domain name, production, redirect, symfony, symfony tips, trick, web