I need make a CMS based en Symfony and the principal work is create subdomains and URIs... any idea where to start? I working with Symfony but I have not done anything like never ...
Thanks !! :)
You should start reading about Symfony2 routing
Then you have to use an A record in your domain administration pointing every subdomain (wildcards) to an specific ip, and editing your .htaccess in order to get an specific response (based on symfony routes) for your subdomains. This post can help you
Related
Symfony 3.4. I have a problem with forcing mailer use only https with URLs in mail such as activation/forgot password mail from FOSBundle, example:
message: |
Hello %username%!
To finish activating your account - please visit %confirmationUrl%
This link can only be used once to validate your account.
Regards,
the Team.
is there way to force mailer use https for %confirmationUrl% and others? Thanks!
Force the routes -that are used to generate full URL's- to https. See this page.
To do that you will have to add your own version of the fosuserbundle routing. You can find the routing files here.
Copy them to your src/AppBundle/Resources/config bundle directory and edit them to make them force https and change app/config/routing.yml to include your own files
Following this question : Static Publishing in Silverstripe on Large Sites
We've been implementing the module from this fork (https://github.com/Focus-Flow/silverstripe-staticpublishqueue/) and it's working great locally. We have done some modification to implement our own categories page, but nothing special.
The only issue is now when we test on our server, which use https rather than http in local, nothing is working anymore. I've been trying to change a couple of thing in the FileSystemPublisher.php file to use https rather than http, but it's not doing anything.
An other thing, and it might be linked, when I go in the admin backend of our subsites, all the page links in the edit page are in "http" and apparently there is a https redirection on the server.
So I guess I have two questions :
How to make static publishing queue work with https ?
How to make silverstripe understand that all of the website page should be in https and not in http, so it shows this way in the admin backend ?
Thanks in advance.
Subsite has a method called absoluteBaseURL(), so you might try this in your Page_Controller::init():
$currentSubsite = Subsite::currentSubsite();
Director::setBaseURL($currentSubsite->absoluteBaseURL());
Of course you need to configure Subsite's Domains including https
I have been making a website for a friend of mine.
http://freelanceaccounting.co.za
It's for a school. Now I want to move the entire WordPress site to his domain.
I was going to follow this guide: (also unless I am mistaken this guide says I don't need to install WordPress on the new domain, the install.bak that the plugin creates. will install it for me???)
http://www.wpbeginner.com/wp-tutorials/how-to-properly-move-wordpress-to-a-new-domain-without-losing-seo/
But I wanted to know if the SO community knew a better way?
Does your domain have a host? if yes download your existing file and upload it to host.
https://ph.godaddy.com/help/upload-files-3239
also dont forget to configure your database in host..
It's easiest way drop a mail or call to hostiong provider say i want to change domain name and set DNS server to new domain and change DNS to old domain.
and check... :)
The problem is as follows: A new WordPress site will be installed on the same Nginx server as the current one. The current one (based on Joomla) has some complex database functionalities which will be reused. I.e. the new site will retrieve a section of it's content from the old site, with PHPs file_get_contents() or HTTPRequests.
I have no knowledge about the current site, so I'm afraid that when I try to give it a new address, I will break things. This is what this question is based on, so if I'm already wrong here, please say so.
Now my idea is to just install a wordpress site with the wordpress address configurations set to the domainname, but without setting the servers pointers for that domainname to the new site. Now I will add a rewrite rule to the current site, which rewrites all incoming traffic to the new site (directory on the server), except when the request comes from localhost, so the new site itself CAN get to the current site.
I'm relatively new to this kind of things, thinking of my proposed solution raises questions too. My question is whether my solution will work, and / or is there a better way of doing this? Unfortunately I can't just go test it.
Thanks
In theory that approach will work but it sounds rather fragile. Rewrite rules can be very tricky to get right even if you know what you're doing, so the "unless it's coming from localhost" may throw you for a loop.
You say you're not sure the existing site will break if you move it to a new domain or subdomain, but there's really no harm in trying, since you can leave the existing domain intact while you try.
So if the existing site is at example.com, try setting up a second virtual host that serves it from internal.example.com. If it works (or at least delivers the content your'e trying to scrape), go ahead & set up the Wordpress site and get the content using the "internal" URL.
The real problem though is that now you're stuck maintaining both a Joomla site and a Wordpress site. What is the complex database functionality you're trying to reuse? Is it at all possible to migrate that into a standalone PHP block that you can then call from Wordpress?
We have the Wordpress MU Domain Mapping plugin installed and have followed instructions to the best of our ability but we can't seem to get this working at all and I've tried everywhere to get advice but no-one seems to know anything about it...
Here's the scenario.
We have Wordpress MU installed at (eg) abc.com so each new Wordpress site we create is then at (eg) site1.abc.com, site2.abc.com, site3.abc.com etc. These are all virtual sub directories and Wordpress MU does not generate any physical sub directories for site1, site2 and site3.
What we wish to do, is purchase new domain names and map them to each one of these sub Wordpress sites. (eg) mynewsite1domain.com will be mapped to site1.abc.com so instead of the site appearing as the following in the visitors browser address bar...
site1.abc.com
site1.abc.com/about
site1.abc.com/contact
...the URL's would appear as...
mynewsite1domain.com
mynewsite1domain.com/about
mynewsite1domain.com/contact
This particular setup is on a VPS running Plesk CPanel, I have complete access to everything including SSH if anyone can advise how on earth this setup is meant to be correctly configured to function as explained above.
I'm guessing something needs to be done with DNS records, at the domain registrar for mynewsite1domain.com, we have the name servers pointing to the VPS IP that the Wordpress MU setup resides on.
Any help would be greatly appreciated.
Thanks in advance.
Are you using WordPress Multisite 3.3.X or an older implementation of WordPress MU (or the MU plugin from a third party)? Likewise, to accomplish domain mapping, are you using the official domain mapping plugin from Automattic or another third party implementation? It sounds like you are using subdirectory vs subdomain multisite. That is not how domain mapping is typically used (the Automattic version at least).
You shouldn't have to point the new domain names to the server's DNS (unless you want it to be the authority), you'll just need to assure that the new domain names resolve to the same IP address of the main web server (an A record should suffice). The domain mapping plugin is pretty straight forward on how to map what domain name to what subdomain and whether you wish to have it redirect or use the new domain name in the address bar. The later would give you what you seek with mysite1domain.com/subfolder, etc.