TYPO3 after update v9 -> V10 second URL page not found - typo3

After the update from v9 to v10.4.12 I have a problem with the access to the web page.
If I use
https://www.country-radio.eu
it works fine, but if I use
https://country-radio.eu
it doesn't work anymore.
I have set
baseURL = https://www.country-radio.eu
SYS trustedHostsPattern = .*
But I got a "Page not found" error.
If I try to access https://country-radio.eu/info3.php it works and shows the php info.
What I have to do, to get the root URL working again under v10?
Edit:
I could not figure out how to do it with TYPO3. Therefore I implemented the redirect with IIS,

I'd suggest to add a rewrite rule in the .htaccess file in the document root and redirect non-www requests to www:
RewriteCond %{HTTP_HOST} ^country-radio.eu$
RewriteRule ^(.*)$ https://www.country-radio.eu/$1 [L,R=301]

Related

Why can't I enter Backend and Install.php after Upgrade to 11?

After update from TYPO3 10.4.32 to 11.5. I can't login to backend (After entering login data I get the error The requested URL was not found on this server.).
typo3/install.php shows an ever rotating icon "Initalizing". It's an composer installation with helhum/typo3-secure-web.
Frontend is working....
Thanks for any help!
I've got two typo311 composer-installations with helhum/typo3-secure-web and same htaccess. One works, the other doesn't...
Frontend works, install.php is not accessible cause of initializing problem like above. Backend shows the navigation on the left side, but not pagetree and content. The backend links are like that:
https://works.de/typo3/module/**web/layout**
https://works.de/typo3/module/**web/list**
https://error.de/typo3/main?token=f9fc9325b02d5450ba04389fb3ba0d74e4f05939&redirect=**web_layout**
https://error.de/typo3/main?token=f9fc9325b02d5450ba04389fb3ba0d74e4f05939&redirect=**web_list**
Other upgrades to 11 without composer and helhum-file configuration private/public work as supposed.
# If the file/symlink/directory does not exist but is below /typo3/, redirect to the TYPO3 Backend entry point.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^typo3/(.*)$ %{ENV:CWD}typo3/index.php [QSA,L]
See https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/11.0/Breaking-93048-BackendURLRewrites.html for more info.

TYPO3 v9.5 Sites: Language Redirects

I am using TYPO3 v9.5 LTS.
The following languages are defined:
0 = en
1 = de
Site Config General:
[base] = /
Site Config Language 0 (EN):
[base] = /en/
Site Config Language 1 (DE):
[base] = /de/
Now when you access the domain without any URL segment for the language, the user gets always redirected to the default language (en) instead if the proper browser language of the user (de).
Am I missing any configuration parameter in order to get a proper language redirect?
Or do I need make any configuration in TypoScript?
Thanks in advance :)
Redirection by user language does not exist in TYPO3 itself, you will need to implement this yourself.
Here is a basic example for an Apache .htaccess:
RewriteCond %{REQUEST_URI} ^/$
RewriteCond %{QUERY_STRING} ^$
RewriteCond %{HTTP:Accept-Language} ^(de|en)
RewriteRule ^ https://%{HTTP_HOST}/%1/ [R=301,L,QSA]
This redirects all basic URLs depending on the browser language. So https://example.org/ will be redirected either to https://example.org/de/ or https://example.org/en/ or kept unchanged if a different language than German or English is preferred. URLs which already have a path (and thus a language segment) won't be redirected as are URLs which have a query string, thus things like https://example.org/?eID=... are not redirected.

APACHE2: avoid https:// REDIRECT to open phpmyadmin

I have a site https://example.net
to ensure that all users go to the https:// I set up a redirect with APACHE (on the default.conf) as followed:
<VirtualHost *:80>
ServerName example.net
Redirect permanent / https://emalsys.net
# DocumentRoot /var/www/example.net/
<VirtualHost *:80>
My issue is when I try to access my phpmyadmin example.net/phpmyadmin I redirect to https://example.net/phpmyadmin and the page cannot be displayed.
(It is obviously working if I remove the Redirect).
How can I get avoid the redirect only for my phpmyadmin?
Any idea?
This is what I use in my servers to force HTTPS
RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
For other examples see Apache's wiki https://wiki.apache.org/httpd/RewriteHTTPToHTTPS
You can enter a REWRITECOND before a rewriterule:
REWRITECOND %{REQUEST_URI} !^http://www.example.com/phpMyAdmin
REWRITERULE / https://emalsys.net
A way around:
I do not know why but if I type as url example.net/phpmyadmin I will be redirected to https://example.netphpmyadmin/ but if I write https://example.net/phpmyadmin/ (with the /)I go to php my admin.
No idea why but I hope it will be of help to others.
to force https:// on pyp myadmin I added: $cfg['ForceSSL'] = true; at the end of phpMyAdmin’s config.inc.php file (see http://thebarton.org/forcing-ssl-with-phpmyadmin/).

Redirect entire request to new domain, without post-pending ANY content after the .com of the original request

I have google'd for at least 3 hours and tried all the examples on stack overflow and other forums.
Does anyone know how to use .htaccess (either redirect or rewrite) to be able to redirect all traffic from one domain to another without passing anything after the .com?
I have an old domain:
http://www.olddomain.com
I want to redirect ALL requests to that domain to a specific URL
http://www.newdomain.com/new/directory/
I have tried quite a few types of redirects and rewrite rules in .htaccess, but if I make a request like:
http://www.olddomain.com/some/directory/
the redirect always comes to the new domain like:
http://www.newdomain.com/new/directory/some/directory/
The redirect is post pending the URI onto the redirect.
I have tried adding ? at the end of the new URL and that does not help.
Here are some of my redirects. (Domain names changed to protect the innocent)
RewriteEngine on
#RewriteRule ^ http://www.newdomain.com/new/directory/ [R=301,L]
#RewriteRule ^ http://www.newdomain.com/new/directory/? [R=301,L]
#RewriteRule /?$ http://www.newdomain.com/new/directory/? [R=301,L]
RewriteRule ^([^/\.]+)/?$ http://www.newdomain.com/new/directory/? [R=301,L]
I tried the Redirect command as well...
Redirect 301 / http://www.newdomain.com/new/directory/?
None of these seems to remove the /some/directory/ and just keep redirecting to
http://www.newdomain.com/new/directory/some/directory/
Any thoughts would be very much appreciated.
Try just:
RedirectMatch 301 ^ http://www.newdomain.com/new/directory/?
But if you would rather use mod_rewrite, it looks like you were pretty close with your rules, it just needs to have the regular expression match anything:
RewriteRule ^ http://www.newdomain.com/new/directory/? [R=301,L]
There's a caveat that if both of these domains are actually hosted on the same server, the same document root, and you're going to be putting this in an htaccess file, then you'll need to add an additional check above the RewriteRule for the host:
RewriteCond %{HTTP_HOST} olddomain.com$ [NC]

how to redirect any url format to my domain?

I have a parkeddomain.com
It used to be a web application but I want any parkeddomain.com url to redirect to another domain
so
parkeddomain.com/signup would lead to anotherdomain.com
parkeddomain.com/page.php?q= would lead to anotherdomain.com
mod_rewrite:
RewriteEngine on
RewriteRule ^.*$ http://anotherdomain.com