I´ve just made a website based upon an only index.html file. You can surf the file using the menu that is made of anchored lists. The problem is that the URL is the name of the anchor, so I have two options:
1.- Rename the whole anchored lists (but there would be still some problems)
2.- Rename the URL using .htaccess, doing RewriteEngine On.
The URL you can see when access to the homepage is:
http://domain.com/#!/page_home
Notice: Only ‘domain.com’ is not real.
And next ‘pages’ are then:
http://domain.com/#!/page_4 and so on…
And I want to be displayed http://domain.com/welcome instead http://domain.com/#!/page_home.
Well, I´ve follow some basic and advanced tutorials with no luck. In theory using something like this should work:
RewriteEngine On
RewriteRule ^#!/page_home welcome
But this and others combinations didn´t work for me.
.htaccess is working because I have another rules like this one:
Options -Indexes
ErrorDocument 404 /notfound.html
Can you give me a hint please?
Thanks in advance.
I’m sorry to tell you this, but it won’t work.
As you know already, anchor is a link to an internal resource in a web page. When you click on an anchor, no request is sent to the server, only the browser goes to the requested resource in the same page. If no request is sent to the server, then no htaccess is called and no redirections are made.
Your only option if you want the links to be like that is to redo the website without using anchors …