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

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).

Related

URL Redirection Issue in DNN

In my local environment of a particular site, when i click on a particular link ,it redirects to the same page but in the url it shows that the page has been visited.Again when i click on the link, it will direct me to that page. Any reason as to why this happens and what could be the possible solution.
For example: My sites name is abc.com. It has pages like help, contact etc. When i am on my homepage and click on help it redirects me back to my home page but in my browser the URL is shown as abc.com/help.
When i click on help again , it redirects me to the help page(URL in browser is abc/help/Help) on the second click.
This can happen if the cache or system index has been corrupted. The best solution is to typically stop & start the application and see if it comes back.
If it is still an issue and you are on an older version of DNN, make sure that the PortalAlias table doesn't have a trailing / on your portal alias.
If this isn't the case, it is possible that a custom URL impacted this, but doubtful.

MVC app redirecting to domain name

I have inherited an MVC app which seems to not want to start properly.
When I run the app it initially goes to http://localhost:63744 but then immediately 301 redirects to http://www.thecompanydomainname.com.
I can't seem to find what is causing the redirect I have looked in the home controller and it seems to have an index action but before it gets there the redirect is happening. I should also mention that this mvc site is partly using Umbraco.
I realise that this is impossible to diagnose without having access to the project but I just wondered if anyone have any ideas as to why this might be redirecting and where I should look for the redirecting code?
Many thanks,
Kiran
I was being stupid. The browser had cached the first 301 (perm redirect) and from that point on simply redirected the request before it got to the application.
I solved (in chrome) this by going to chrome://net-internals. On the right of the top red status bar, click on the down arrow ▼ to open the drop-down menu, and under the "Tools" group, choose "Clear cache".

No template exists to render the document at url '/'

In Umbraco, why does one get this error on a new deployment or machine that is pointing to an existing umbraco database and existing content?
Page not found
No template exists to render the document at url '/'.
In addition, no template exists to render the custom 404.
This page can be replaced with a custom 404. Check the documentation
for "custom 404".
This page is intentionally left ugly ;-)
One other thing to check is that if the page is published you have a template selected for the page or you will also get a 404 error.
The reason it was doing that was because the domain name wasn't setup correctly.
I was using a custom domain to host the site, and umbraco was obviously not matching the incoming request to a site in the CMS.
By going to the Site and right clicking -> Culture and Hostnames, I could set the hostname.
As per this answer: Umbraco configured with IIS 7 having hard time with the site URL?
Did you set your hostname in Umbraco?
Right click on the site root in your solution and click "Culture and hostnames"
Fill out your hostnames and save
You could try and force a full republish and refresh of content, use http://example.com/umbraco/dialogs/republish.aspx?xml=true assuming your installation wnet well and you can see the pages in the content area. As for the 404 you need to set one your self and assing it in the umbraco config file.

Umbraco multiple sites same node name throws 404

I have an umbraco installation that has two sites in it both with a page called Contact Us in the root. I have configured their domain names so in development I have site1.local and site2.local
if I go to site1.local/contact-us/ the page works fine but then if I try to go to second sites contact us page (site2.local/contact-us/) it just redirects me to the first sites 404 page.
Has anyone come across this problem or know how to fix it?
Check you have set up a template and assigned it to the page as you get redirected to the main 404 if no template is set. If so

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