A community in which webmasters can ask for help with topics such as PHP coding , MySQL , IT jobs, web design, IT security.
Current location:homephp forumphp talk in 2009 yearSymfony: Options for admin URL - page 1
User InfoPosts
Symfony: Options for admin URL#1
In development mode my symfony admin/backend app can be accessed at http://localhost/backend_dev.php. For production mode, I created a controller php file, admin.php, so now in production the admin application can be accessed at http://www.domain.com/admin.php.

What do I have to do to allow the admin app to be accessed at domain.com/admin or admin.domain.com?

Thanks!

posted date: 2009-04-14 03:20:00


Re: Symfony: Options for admin URL#2
I had made out the solution of this problem. click to view my topic...

hope that hepls.

posted date: 2009-04-14 03:20:01


Re: Symfony: Options for admin URL#3
Here are some basic ways you could do it:Either dump admin.php into a folder called (admin( in the root of www.domain.com, and rename admin.php to index.php. (Easiest solution)Of course, this way you have to adjust all relative links in admin.php to one level up (appending (../( to the start of all relative urls should work), as well as all absolute links to reflect the changes. Regarding your admin.domain.com, you should contact your webhost/domain name provider to setup a subdomain for you.Or if your webhost allows .htaccess files, you could write a mod_rewrite rule.

posted date: 2009-04-14 03:30:00


Re: Symfony: Options for admin URL#4
i would create a module called admin...then in presumably the index action I would put whatever you had in your admin.php file.then in your routing.yml file just point yourdomain.com/admin to the admin/index....that way you keep everything within the symfony front controllerAndrew

posted date: 2009-04-29 15:20:00


Re: Symfony: Options for admin URL#5
You probably are better off putting everything admin like in the admin directory, but you can cheat by using mod_rewriteRewriteRule ^admin/?$ admin.php [L]

posted date: 2009-05-10 19:11:00


Re: Symfony: Options for admin URL#6
you can open new subdomain an on that subdomain (admin.domain.com) setup virtual host that points to server with your symfony app.you can look at the full tutorial [here][1].[1]: http://blog.mirthlab.com/2008/03/04/dynamically-loading-symfony-applications-via-subdomains/ here

posted date: 2009-09-16 04:42:00


Re: Symfony: Options for admin URL#7
One of the possible solutions is listed here: http://forum.symfony-project.org/index.php/m/44261/?srch=admin+mod%5Frewrite#msg%5F44261

posted date: 2009-09-16 04:48:00


Re: Symfony: Options for admin URL#8
In a big app, this approach is doomed to failure (says he, looking at his scars). Too much maintenance to ensure that relative and absolute URLs go where they should.

posted date: 2009-11-02 07:11:00


Re: Symfony: Options for admin URL#9
Make sure your DNS resolves the admin.domain.com correctly, then edit .htaccess in the /web to have mod_rewrite pick up on your subdomain and rewrite requests to admin.php. Optionally rename your admin.php to something less obvious or perhaps do a quick subdomain check inside it as well, or extend the rewrite with a 301 redirect if anyone hits domain.com/admin.php.The following simple .htaccess works for me:Options +FollowSymLinks +ExecCGI<IfModule mod_rewrite.c> RewriteEngine On # The admin subdomain returns the backend RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{HTTP_HOST} ^admin\.domain\..* RewriteRule ^(.*)$ admin.php [QSA,L] # 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 ^(.*)$ index.php [QSA,L]</IfModule>Change domain to your own domain.

posted date: 2010-06-17 01:16:00


select page: « 1 »
Copyright ©2008-2017 www.momige.com, all rights reserved.