I know this is a simple and quick thing, but site is going live within hours and I dont have any experience on htaccess so Im hoping someone could give some quick help with this.
So what I want is that I have html files root folder. Files are index.html, german.html, swedish.html, spanish.html, danish.html. Now I would like to have the URL so that german site would be in www.domain.com/de swedish www.domain.com/sv english/default in www.domain.com/en and so on. This should be possible to do with htaccess right?
Or is there better way to do it?
Thanks alot!
What Is a 301 Redirect? A 301 redirect is a permanent redirect. When a user tries to access an old URL, the server sends their browser the 301-Permanently Moved status code and sends them to another page. This is useful for site owners and users because it means they are directed to the next most relevant page.
The . Because the WordPress 301 redirect is not always reliable, we recommend issuing the 301 redirect via your . htaccess file. Another benefit is that the . htaccess redirect is slightly faster than redirecting via PHP, because it is loaded even before the rest of the page.
Redirects allow you to forward the visitors of a specific URL to another page of your website. In Site Tools, you can add redirects by going to Domain > Redirects. Choose the desired domain, fill in the URL you want to redirect to another and add the URL of the new page destination.
Create a .htacess fil with the following contents:
Redirect permanent /german.html http://yourdomain.com/de
Redirect permanent /swedish.html http://yourdomain.com/sv
....
I hope this is what you ment and that it helps :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With