Magento 2 add /home to homepage url only - magento2

I have tried to add custom url rewrite from Magento 2 admin with
Request Path = /
Target Path = home
Redirect Type = 301 Permanent
So when user visit the homepage, url will be 'baseurl/home'
With this solution, there is cache issue with homepage as at first, baseurl will be loaded and again redirected to baseurl/home so first landing will skip the cache hence homepage is slow.
So how we can add /home to baseurl for homepage only without any redirection?

1) In database Search the core_config_data
2) Change the web/unsecure/base_url In add value http://127.0.0.1/homagepage/
as to same to web/secure/base_url
3) And command in terminals rm -rf var/cache

Related

Redirecting URL/main domain without redirecting subdirectories

Is there a way to redirect the main domain, without redirecting it's subdirectory?
E.g. I want to redirect: https://domain1.com --> https://domain2.com
But I do NOT want to redirect it's subdirectory: https//domain1.com/sub
Is there a way to do this in DirectAdmin, or in .htaccess in main directory on Apache shared server?

Drupal 8 Internal Redirect

How would I go about implementing an internal dynamic redirect in Drupal 8?
For example lets say my url is "/toy" but internally it needs to be routed to "/filters/toys".
Thanks!
You can use module Redirect:
Install and enable module
Go to Configuration > Search and metadata > URL redirects
Click Add redirect, enter old path and new path you want redirect to:
4. Then Save

Redirect 301 to old site

I briefly explain my problem.
I created a new site through wordpress that I have installed in the root (www.miosito.it);
To install the site I moved the old site in the old folder (www.miosito.it/old); the problem is that Google has already indexed in the past the old well site, and then I would do a 301 redirect from (www.miosito.it) to (www.miosito.it/old).
I thought since this is the html file to act in this way:
RedirectMatch 301 ^/(. *)\. Htm http://www.miosito.it/old/$1.htm
but I get an error like
www .miosito.it / old / old / old / old / old.nomefile.htm
I noticed from various tests that the problem is that ending .htm .php fact if I replace it with no problems.
How can I fix?
Alternative solutions?
Thank you all
You are getting a redirect loop error because your Redirect pattern and target are indentical so You need to exclude the target uri from your pattern :
RedirectMatch 301 ^ /((?!old).*)\.Htm http://www.miosito.it/old/$1.htm
Clear your browser cache before testing this.

Static website in Google Cloud - how to set mainpage (when index.html is in a different folder)

I just joined. I created a bucket for my static website. The index.html (or mainpage per google terminology) is in a different folder in the same bucket. I set my index.html as the page to show up automatically (www.example.com)
I get the website on my browser if i type exact http url including my file name - IT WORKS. But, if i type the domain name alone on the browser, i get the following error:
<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
</Error>
I did setup my MainPage on the bucket options. HEre is my gsutil web get.
{"mainPageSuffix": "gs://www.example.co/NewHome/index.html"}
But index.html does not show up when i type only example.co in the browser. Any suggestions???
Found the answer the path is relative to home (bucket).
So this works
{"mainPageSuffix": "NewHome/index.html"}.
In case the developers of the Google-cloud for web are listening to this...
Even though the system picks up the index.html in a different folder, the images, jss etc are not pickedup. The current working directly still remains the home directory. (In the web case this could be relaxed to change the CWD based on where the mainpage suffix is pointing to. (just an opinion).

"URL not found" error at my localhost setup of TYPO3 website.

I have setup TYPO3 successfully on my local server. But I am having problem when clicking on any menu item: It's showing "url not found on server".
When I type in the URL manually into the browser it shows the page. It's only having problems when redirecting after clicking on a page item at any frontend website page.
That might be related to the domain config or RealURL... or both ;)
Do you use RealURL? Or do you use the standard url config?
If links to sub pages look like index.php?id=12345 you are using the standard config.
My guess is that the local DNS ("hosts file") is not configured correctly.
With the hosts file you can simulate how the web site will appear when it's online, hooked up to a "real/global" DNS. (Not quite, but in a nutshell)
So if you set up Typo3 to be reached under http://www.example.com/ you need to tell your local DNS ("hosts file") to route a request to http://www.example.com/ to your local host e.g. http://127.0.0.1/ . In that case your host file needs an entry like so:
127.0.0.1 http://www.example.com/
What Domain do you enter to reach your web site? Where do the links from the menu link to?
If you wanna know mor about the "hosts file" look here:
http://accs-net.com/hosts/how_to_use_hosts.html
If you can log in into the TYPO3 backend (/typo3/) and can access the frondend through /index.php, but not through the generated menu links, then RewriteRules for mod_rewrite don't apply.
Usually TYPO3's installer should detect this configuration and disable RealURL, which is responsible for generating such nice looking URLs (instead of index.php?id=123). It seems like this failed (or you copied everything afterwards without the .htaccess file?).
Make sure that you have TYPO3's .htaccess file in place in the root directory of your installation. If this is the case, make sure that mod_rewrite is enabled in your Apache config.