Need to get rid of lang version in url - contao

Have a project on Contao CMS 3.3.6.
Main page adress has url: sitename.com/en/
Even try sitename.com, whatever redirecting to sitename.com/en/
I have tried fix it by using htaccess but it is not works: too many redirects.
Also I didn`t find redirects type of
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://sitename.com/xx");
How can fix it? Or where I need to see?

You don't need .htaccess to do that. Go to the backend settings. Uncheck 'add language to url' in the front end configuration fieldset. That should do it. First reverse what you have done with the htaccess file

Related

How to handle links that don't start with http, https in nextjs Link component

I am trying to make nextjs Link component to redirect correctly to a website that don't have a http, https in it i am storing links in database based on what user writes and some of them don't inclue http, https but for some reason the Link component appends these links to my current website url for example:
google.com will redirect to mywebsite.com/google.com
any possible way to resolve this issue
i have tried searching online with no luck
If I am on a URL such as:
http://example/
And I write a link like this:
<a href="foo" />hi</a>
Then clicking the link will go to:
http://example/foo
So if your link look like:
<a href="google.com" />hi</a>
Then the expected behavior is for that link to go to:
http://example/google.com
So this is all exactly as expected. If you have links stored in the database that were supposed to include https://, then you need to add that before writing your links.

Is it possible for Contao to not redirect to home page alias?

Older Contao versions by default did not redirect to the first public page, so the front page was displayed with both domain.com and domain.com/front-page.html and neither was redirected to the other. However the newest Contao at least (4.8) does force a redirect from domain.com to domain.com/front-page.
There is one setting, Do not redirect empty URLs, which looks like it could do the trick, but, in my case at least, does not seem to do anything.
So how do I prevent Contao from redirecting from a "blank url" to the first published page of a website root? I'd much rather redirect the other way around, from /front-page to /.
Simply set the alias of your start page to index. The generated URL by Contao for the page with the alias index will always be without a path.
See also the documentation about page aliases (English version still WIP).

Remove index.html from url in Weebly without .htaccess file

I want to remove "index.html" from the homepage URL of Weebly site without .htaccess file, please help me to resolve this problem.
Weebly does not currently provide the option to redirect /index.html to the root domain URL or give you the access needed to properly make those changes, however, links to your home page (at least on your website) should be going to the domain-root.com and not /index.html so you should be ok there.
Keep in mind that index.html is a file, that exists as the home page for the folder your website pages live in, and you can't remove it from it's existence(at least on Weebly).
So, the thing to do would be to submit it to Weebly as a Feature Request and request that they make the necessary changes on their end, for the sake of ALL Weebly users! ;)
https://community.weebly.com/t5/Vote-on-Features/idb-p/IdeaExchange

ModX: Changed to Friendly Alias URLS but now Wayfinder isnt working

I've used Wayfinder in my template, eg:
[[Wayfinder? &startId=`8` ]]
and it was working fine until I turned on friendly urls (by going: System>>System Settings>>User Friendly URLS)
Now none of my links work. On top of this if I click the 'View' button from a resource page or enter the full url into a browser I get a 404 error.
Am I missing something in this process?
(ps Im using Revo 2.1.3)
Have you configured your .htaccess file? It's required for friendly urls. When you install MODX it's named ht.access, so you'll need to rename it to .htaccess.
If you've installed MODX in a subfolder you'll also need to set it here:
RewriteBase /folder-name
As Sean suggested, you'll also need to clear your cache to have your Wayfinder menu rebuilt.
it's probably your cache - just clear it and you should be fine.

Something wrong with redirects on my Joomla 1.5.18 site

My Joomla 1.5.18 site, I enabled login, when I click login the page I get sent to is NOT styled with CSS. If I login it redirects to the home page and it is not styled anymore either.
It looks like it is recursively appending stuff to the URL incorrectly.
http://www.myjoomlasite.org/index.php/index.php/login
if I click on home page or login links it keeps putting more and more index.php entries in the URL, and sometimes on the end. The following is what I get when I try and go to a JEvents menu item.
http://www.myjoomlasite.org/index.php/index.php/index.php/index.php/upcomingevents/month.calendar/2010/06/09/index.php
Anyone have any idea why this is happening? I don't know what to search for on Google apparently, and none of the Joomla! books I have address this.
I figured it out I had turned on Search Engine Friendly URLs in SEO Settings under Global Configuration. Turning this back off fixed the problem. Now I guess another question will be along the lines on how to get the Search Engine Friendly URL's to work again.
Make sure you link to stylesheets and images using a link that starts with a leading slash and therefore counts from the root.
It is the browser that evaluates the URL for those resources, based on the URL of the currently viewed HTML page. Never use relative links for these resources.

Resources