TYPO3 change the site url to Localhost after copying from live site - typo3

I am new in TYPO3, I copied a TYPO3 system to localhost so I can develop offline, no my problem is all the link points to the live site. my_live_cite.com
What should I change in the backend to redirect all links and ref to localhost ?

Check and adapt for sys_domain records (see root page PID=0).
See also TypoScript (TYPO3 backend modul Templates) and check/adapt the domain you are looking for to change. Select in TypoScript Template module TypoScript object browser where you can search in constants and setup (configuration) for strings.
Cause of TypoScript can bee different ways, to handle domains. Have a look at config.baseURL and maybe page.config.baseURL

Related

TYPO3 No TypoScript template found - custom page

We're running TYPO3 9.5 with correctly set up Site Configuration. The main domain has multiple subdomains which have their own Site Configuration.
domain.com
sub1.domain.com
sub2.domain.com
sub3.domain.com
All these urls point to a different Site Configuration, which works fine. But when a user types sup1.domain.com instead of sub1.domain.com, "No TypoScript template found!" is shown. Within the Site Configuration "Error Handling", "Show content from page" is set up for error 503.
The configured error page is not showing, but the default "No TypoScript template found!". How could we show an actual TYPO3 page when a subdomain is entered wrong?
The 404 page works fine, but only with segments after the actual domain, eg. sub1.domain.com/does-not-exist shows the 404 page, as configured.
As already noted by Julian Hofman you should redirect all 'non-existend' subdomains to your main (sub) domain.
Sure, in this situation you cannot handle typos, but this solution is very fast and error-safe. TYPO3 can only handle "known" (sub)domains.
Redirecting all unknown subdomains can be done via .htaccess (on Apache) or your domain hosting admin-panel .
HTH Henrik

Why do I get an 404 Error after using TYPO3 V9.5

I am using TYPO3 9.5 and I created a root page with several subpages.
Before I created a site configuration the subpages were available as
/index.php?id=19
after the site configuration the url has changed to
/events
which is absolutely fine but my subpage cannot be found anymore. I get an 404 Error.
The subpage is still available under the old url but the new one doesn't work.
What can I do to fix this?
after changing the slug(path/path segment) for a page you need to update the slugs for all subpages manually.
The slug is generated automatically when the page is created. Probably your slugs were generated wrong before you build your site configuration.
Try to autogenerate all the slugs with the adapted wizard. You must do it by hand for each page as there is no wizard for page subtrees (yet). you might do the multi-edit in the list module for the slug field.
I have similar issue and no clue how to solve. See TYPO3 9.5 URL Routing with URL Segment is not working
Manual slug override, saving, chache clearance etc. does not help.
Are you using as well Apache? Maybe the issue is related to the webserver.

TYPO3 - Multi-Domain-Installation

Does anybody have sophisticated knowledge about running a multi-domain-site using a single typo3-instance ?
E.g. I have 2 domains, both being served by the same webserver, using different vhosts. What I want to achieve, is both vhosts pointing to the same document root, where a typo3-instance is installed. This TYPO3-instance should check by typoscript, which domain was used in the request and forward requests for each domain to a specific subpage ("landing page for that domain").
I need this to work in a productional & stable environment, due to custom-self-developed extensions, which provide necessary data for both installations, also specific extbase-domain-models should be usable in both domains etc.
I am already able to check the requested domain via typoscript-conditions. What I am missing, is some info, about how I could possibly realize the redirection, without the client being redirected to the landing page each time while using sub-pages of the landing-page. Do I need to set cookies for this !?
Thanks in advance, Oliver
In TYPO3, you can combine several sites (each with a different domain) in one Installation. This already works out of the box.
So, for this requirement
This TYPO3-instance should check by typoscript, which domain was used in the request and forward requests for each domain to a specific subpage
it is not necessary to add a check for TypoScript, TYPO3 will automatically resolve the URLs.
Page Tree:
pid=0
| --> root page 1
| --> root page 2
On both root pages, enter page properties : "Behaviour" checkmark enable "Use as Root page"
On both root pages, create a TypoScript template, edit it, got to tab "Options", checkmark "Rootlevel". Have this TypoScript template include your general TypoScript configuration, e.g. via "static includes" (ideally you put your TypoScript configuration in an extension)
Since TYPO3 9: configure a site for each page tree under "Site Management > Sites". Before TYPO3 9: On both root pages create a "Domain" record

Creating a page on CMS

For example:
I create a page on Joomla or Wordpress and then save it.
I create an entry in the menu that points to the new page.
When I select the new entry in the menu the page opens on the browser.
The URL that appears points to a file that doesn't exist on the server.
What is the mechanism that is used by a CMS like Joomla or wordpress to accomplish this?
This is typically done with a URL rewriting module that runs on the web server (mod_rewrite for Apache or URL Rewrite for IIS on Windows). It will rewrite a request URL like /blog/article-title to something like /index.php/blog/article-title or /index.php?q=blog/article-title before the website code even sees the request. Then, the code in index.php extracts the rest of the path and determines which content to serve based on that.
For Wordpress, see http://codex.wordpress.org/Using_Permalinks for some info about how the rewrites are set up.

Where are subdomains ("shortcuts") defined in TYPO3?

On a corporate website managed with TYPO3 there are shortcuts defined which lead to a page on the site.
Example:
Corporate website is www.acompany.com
Then there is a site www.acompany.com/coolproduct which is redirecting the user to www.acompany.com/products/productgroup3/product25.htm for example.
Where in TYPO3 can such "shortcut" links be defined?
Most probably some page in the page tree has set type to: Shortcut which causes that it points some other page or resource, it's also possible that is set as Link to External URL and there is full URL given.
Check the page tree in the backend and find your coolproduct page in it. Then check the site's properties and change if required to other value/type.
It's also possible that this URL is generated by some plugin or TypoScript, but in this case you'll need to investigate it yourself.
Simplest way to find these kinds of things is actually using the search engine in the TYPO3 backend. You will find it in the upper right corner.
If this fails, what I do is install PhpMyAdmin from the extension repository. Once you have PhpMyAdmin you can use it's search functionality to find anything in the database using a search query of: '%coolproduct%' and selecting all tables. In the results look for the 'pid' field. It tells you on which page in TYPO3 the found item is located.
Does the page use the extension realURL? If so, there might be realURL redirects defined.
Have a look at page -> info -> RealUrl -> Redirects
Maybe you the user has defined this link redirection in many pages, you can search for it in the database exactly in the tt_content table.
You can set shortcut for your domain to any page of your site, so when user enter only your domain name in url then it redirects to page which you set in shortcut.
For that edit your domain and set shortcut to any page of your page tree.