I have a subdomain named blog so i usually access by blog.mydomain.com
but can also accessed by the url mydomain.com/blog. I don't want this url to be used and how can i prevent it ??
The only way you can prevent that url i.e*(mydomain.com/blog)* is to redirect it using .htaccess to the subdomain.
Related
I am using netlify to host an html webiste. On the url, each page goes to example.com/name_of_html_file.html. How can I remove the .html from the url slug. If it has to do with the domain provider, the domain is registered through google domains, but the webpage is hosted through github and netlify. Thanks!
You need to untick Disable asset optimization under Settings -> Build & deploy
See link for example taken from.
If that does work try the solution from the community.
Truly hope that helps.
I've set up my custom domain with firebase hosting using their CNAME and A record details. Visiting http://sub.example.com redirects to https://example.com (not what I wanted)
I want to persist my subdomain (https://sub.example.com) in the address bar without the 301 redirect to (https://example.com) that I'm currently getting. Is this possible to set up this behavior within firebase hosting itself? I'd also like to point this sub domain to a certain html file/directory that I configure.
Basically, I am trying to redirect my own URL e.g. apps.mydomain.com to Google Apps. I would like to keep my domain name in the URL.
I tried using iframe, but it does not load Google in an iframe. It does load other websites. I also tried using htaccess and the [P] flag, but it says index.html not found.
mod_rewrite is enabled on my server.
Any help would be greatly appreciated.
Edit
The [L] redirect seems to work.
You won't be able to this. Google have enabled X-Frame-Options: Deny which prevents this scenario for security reasons.
Further reading: https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options
I am trying to upload files to dropbox from my website using Drop-Ins provided by dropbox. While creating app on dropbox for this I have added Drop-Ins domain "www.mydomain.com". But now, my website URL contains sub-domain like "www.subdomain.mydomain.com". This sub-domain changes with the users.
When I try to upload to Dropbox from such URL then dropbox is responding with error message Origin does not match any app domain. I know it is because of URL registered (while creating app on drop-box) is different then URL from where I am trying to upload.
So, how can I upload files to dropbox from URL which contains sub-domain and it (sub-domain) changes with users.
In this case, you should be able to just register the bare domain, for example, mydomain.com, which would enable use on any subdomain of mydomain.com, e.g., subdomain.mydomain.com, subdomain2.mydomain.com, www.subdomain.mydomain.com, etc.
I have a website which I want to hide its URL the second a user enters it.
Is this possible in any way?
This is done server-side. You cannot change the url of the site with let's say javascript or php. If you write your .htaccess file to point to that url, or rename the url of your site on the server to change what the user is hitting is the way to do that.
You can check here for the .htacccess way of doing it.