Friendly url html with folder language - html

I was wondering how this site https://www.jrsa.com.ar/ works with friendly URLS and languaje selector.
For example, if you put https://www.jrsa.com.ar/es https://www.jrsa.com.ar/es/es is the same result, the same page. In the browser if you write https://www.jrsa.com.ar/servicios is the same if you write http://www.jrsa.com.ar/es/ex/servicios.
In the browser if you type www.jrsa.com.ar/folder/folder/folder/servicios is the same as www.jrsa.com.ar/servicios. I canĀ“t understand how you can add folders and getting the same page.
Can some help me to find to achieve this? I only have this htaccess
# Activar RewriteEngine
AddDefaultCharset UTF-8
Options -Indexes +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.]+)$ $1.html [NC,L]
RewriteRule ^([^\.]+)$ $1.html [NC,L]
Mi test URL is: http://clients.devilleartstudios.com/jrsa
Thank You

I suspect their content is stored in a CMS database that supports localized content. It is not feasible to do this with a manually-managed static website because you'll need to recreate common HTML structure (like navigation, global content, etc) in every page. If you really want to accomplish this with a static website then consider using a system like Jekyll: https://jekyllrb.com/

Related

How to hidden name end url index.html

What I mean by last name in the url, like index.html for example the url link on my website homepage. the result is like this
https://hijaben.insomnia247.nl/index.html
I want to remove or delete the last name of the url (index.html)
I tried using the .htaccess file but it didn't work at all. Is it possible the script is wrong or the VPS doesn't support or what? the solution ..?
File .htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html
</IfModule>
https://www.digitalocean.com/community/tutorials/how-to-rewrite-urls-with-mod_rewrite-for-apache-on-ubuntu-16-04
Please check this out im sure it can help you with your problem sir.
https://www.linode.com/docs/web-servers/apache/how-to-set-up-htaccess-on-apache/
Don't overcomplicate things with unnecessary mod_rewrite. Just use DirectoryIndex index.html.

How to route from site.com/home to site.com/home.html (remove .html) in htaccess?

Many sites have URL addresses like this:
youtube.com/watch
Not youtube.com/watch.html.
For example, stack overflow now shows: https://stackoverflow.com/questions/ask, not https://stackoverflow.com/questions/ask.html or https://stackoverflow.com/questions/ask.php etc. How to do this in (simple site hosting) .htaccess (or another file, I only heard it was done in htaccess)
I think you should understand my question.
There are many posts about it already, but I couldn't find a one that fits my needs and works. Thanks.
To remove .html extension use:
#remove html file extension-e.g. https://example.com/file.html will
become https://example.com/file
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html [NC,L]
You should be able to read the above and figure out how to remove other extensions

Not having `.html` in Website URL?

How is it possible to have a url of a basic website, not include the .html at the end of a webpage?
My website is just a few pages, but I don't like having the .html in my link: www.mywebsite.com/mypage.html
If I type: www.mywebsite.com/mypage, of course, it's not found :(
I navigate around my site just using typical hyperlinks.
Probably a dumb question, but I've googled it and the stuff I find is way more complex than just html code and is usually referring to php or perl.
Thanks.
You sinply make an .htaccess file and put the following in it:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\.html$ /$1 [L,R=301]
What web server software are you using? If Apache, you will likely be interested in the rewrite mod.
Something like the following:
RewriteRule ^mypage/?$ mypage.html [NC,L]
In your .htaccess file. I believe you need to enable the mod first too.
Simple solution is to change the name of your website from mypage.html to mypage

HTML Place in folder while not placing it in the site directory? [duplicate]

My aim is:
domain.com/folder
rewrite ->
domain.com
this shall concern ALL links inside that site.
I mean on the site are links like:
domain.com/folder/forum.html
domain.com/folder/community.html
etc.
This is my aim:
domain.com/forum.html
domain.com/community.html
etc.
and its very important that the "folder" is never in the url in the adressbar visible.
I tried already many codes but I couldnt really solve this problem.
My best try was with this code:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !(.*)folder
RewriteRule ^(.*)$ folder/$1 [L]
If I enter
domain.com
I get the content of
domain.com/folder
displayed, what is correct ("folder" is not in the url shown). But when i click on some links of the site like: domain.com/folder/community.html then I can see again "folder" in the url, but I want that it becomes ALWAYS removed.
here is my site:
thewedgiecommunity.x10.mx/wedgiecommunity/
My aim is to remove the "wedgiecommunity" (=folder)
This link is working
thewedgiecommunity.x10.mx/
But when you click on Community (
thewedgiecommunity.x10.mx/wedgiecommunity/community.html
) then i get again "wedgiecommunity" in the URL.
Would be awesome when someone could help me
You can use this code:
Goes in DOCUMENT_ROOT/wedgiecommunity/.htaccess:
RewriteEngine On
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+wedgiecommunity([^\s]*) [NC]
RewriteRule ^ %1 [R=301,L]
Goes in DOCUMENT_ROOT/.htaccess:
RewriteEngine On
RewriteRule !^/?wedgiecommunity wedgiecommunity%{REQUEST_URI} [L,NC]
You can use this rule to "remove" the folder from the URL when it is accessed directly via the browser:
RewriteCond %{THE_REQUEST} \ /wedgiecommunity/
RewriteRule ^wedgiecommunity/(.*)$ /$1 [L,R=301]
Then your other rule will handle the rest.

Rewrite a Specific URL with htaccess

Ok, So I am very noob with htaccess. Basically, I want my site
http://mydomain.com/game.html
to go to
http://mydomain.com/index.php?page=game
I don't have a current .htaccess because almost all I've tried, have failed.
Does anyone have a working one to that?
Try adding this to the htaccess file in your document root:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)\.html$ /index.php?page=$1 [L,QSA]
This internally rewrites a request for /anything.html to /index.php?page=anything. You'll have to make sure all of your links look like http://mydomain.com/anything.html though, because it doesn't do anything about what's shown in the browser's URL address bar.