Redirect to a specific page on a DNN site with an extensionless URL - redirect

I have a page on my DotNetNuke site and I would like to set up a redirect and was wondering the best way to do it. Here is the problem:
I have a page on the site: mydomain.com/dashbaord.aspx. I would like users to be able to type mydomain.com/dashboard OR mydomain.com/Dashboard and it will redirect them to the /dashboard.aspx page.
I have IIS6, so I set up wildcard mapping, and it seemed to work for /dashboard, but not /Dashboard. Also, I am looking for it to literally redirect you so that /dashbaord.aspx shows up in the address bar. In addition, the wildcard mapping broke some other links on the site, so I was looking for an alternative method to accomplish this. Is there a way that I can set this up through IIS? Or any other way?
Thanks in advance for the help.

In IIS, create a virtual directory by right clicking on Sites, and then call it Dashboard. Then set that to redirect to a specific URL, in your case, http://mydomain.com/dashboard.aspx.

Related

ColdFusion route redirects

Is there a way using ColdFusion to have a one page that can route url redirects? I have a bunch of one off page redirects and it is really weighting down my Git commands.
So Like:
abc/index
test/index
redirect/index
etc...
So I'm trying to figure out a way to move these all to one app that can route them to the correct redirect. Doing this on the server is not an option for me as our server admin has a lockdown on access.
the best is to have URL rewrites at the server level.
However, you can you use onRequestStart function in your Application.cfc and match the page being called and redirect accordingly.
Basically, have some logic added in the onRequestStart according to your needs.

Set my blog as my homepage? Redirect?

When I first started my website, I had a home/landing page and I installed my blog at myurl.com/blog. I no longer need that homepage and am wondering if there is a way to set myurl.com/blog as my homepage? So if someone types in myurl.com, it will automatically go to myurl.com/blog.
I'd like to avoid any "click here to be redirected" or "you'll be redirected in 10 seconds" type of thing.
There are likely multiple approaches, depending on your setup, but IF your setup qualifies (linux hosting etc) then a simple .htaccess permanent redirect would be the simplest approach:
# Permanent URL redirect
Redirect 301 /blog myurl.com

Redirect Github Pages to custom domain

I have created a Github Pages site and put it on repository abc of github account with username xyz.
So, my site is now live on xyz.github.io/abc
I created a cname file with my custom domain, and configured my DNS with the settings said on Github pages.
Now, my site is also live on mycustomdomain.com
Now, I don't want my site to be live on xyz.github.io/abc . I want it to redirect to mycustomdomain.com or not accessible.
Is there any way to do that?
I know that I can create User Pages site (with username.github.io) which will automatically redirect to custom domain, but I want to create project site.
Any suggestions?
A CNAME solution:
Sure. Github has a nice functionality for it.
When you create CNAME folder inside of your repo, you will be redirected:
https://help.github.com/articles/adding-a-cname-file-to-your-repository/
Check out my Github Pages website: https://github.com/ondrek/ondrek.github.io
( you can browse ondrek.com, but it's impossible to browse ondrek.github.io )
A JS solution:
If you want to redirect a custom page — the only possible solution will be javascript redirection.
if (window.location.href==="https://xyz.github.io") {
window.location.href = "https://mycustomdomain.com";
}
but it will not solve your problem with Google. You can solve this with correct using Google Webmaster Tools and tell to Google about the duplicate (for SEO purposes).
I had a GitHub Pages website (https://kamarada.github.io/), I moved it to GitLab (https://kamarada.gitlab.io/) and besides that I set up a custom domain on GitLab (https://linuxkamarada.com/). Now the question: how to make a 301 redirect from the GitHub Pages to the custom domain? Is that possible?
Well, as Ciro Santilli answered on this other question, there is no "beautiful non-plugin solution". Indeed, the solution I found is not beautiful, it is more kind of a workaround, but it works.
Inspired by the Samuel Ondrek answer on this same question (thanks a lot!), I set up CNAME redirection.
Go to your GitHub Pages repo, click Settings and below GitHub Pages, under Custom domain, enter your custom domain and click Save.
Now open another tab on your browser, open DevTools (F12), select the Network tab. Try to access your GitHub Pages website and see that a 301 redirect happens.
GitHub is going to complain that your domain is not configured properly:
Well, that does not really matter. What matters is that you have the 301 redirect required by the Google Search Console's Change of Address Tool and your website won't lose its Google ranking.
This might be a bit old but I'd still like to give an alternative answer to this. You can simply use meta refresh on your index.html
<meta http-equiv="refresh" content="1;url=http://example.com/" />
Then use a regular link (an a message also) on the page in case refresh stops. Though it is not recommended for SEO since google might index the blank page. But it would most likely work work.
You could use JavaScript to inspect the domain of the current page and redirect if necessary. If you go this route, the question and answer are already on SO:
Redirection based on URL - JavaScript

Redirects in Ektron 8.6.1

Has anyone played with the new redirect feature in Ektron 8.6?
We tested it (in 8.6.0) before upgrading and were happy with it. But when it came time to do the upgrade, Ektron had released 8.6.1, so we upgraded directly to that.
Now we are having trouble with the redirect feature. (Yes, we should have tested everything again in 8.6.1 before upgrading)
Now if we try to add a redirect rule for an existing page in the CMS, it does not work.
But if we create a redirect rule for a page the does not exist, then try to hit that address, the redirect works fine.
We need the redirects to work for existing pages in the CMS.
To clarify what "working" and "not working" means...
If I have an existing page in the CMS with manual alias of "/erc/lucien.apsx", I can create an entry in the redirect table like this...
Adding this entry generates no errors, but when I visit the page, all I see is the regular old page I created. NOT the Google site it should be redirecting to. I do not get any 404 errors.
But if I create a redirect entry for a page that does not already exist, like this...
It works perfectly. If I try to visit the /erc/fake.apsx address, I end up on the Google site, as expected.
(FYI, we create a "fake" page in the CMS for external content so we can attach metadata to it and make it searchable in taxonomies, but then provide a link to the "real" page. I want to use redirects here so users don't have to do this extra click)
I suspect it might be cache related -- the original URL gets cached as an alias, then subsequent requests to that URL are redirected to the quicklink without the need for a db look up. When you add the redirect, it’s probably not clearing the old item from the cache. I'd try an IIS reset after you add the URL redirect and see if that clears up the issue.
An "outside the box" (of Ektron) answer to this is to place the redirect at the web server rather than in the Aliases section of the Ektron CMS.
The server I work on uses IIS and I have this set up for several pages.

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.