Abyssal
Abyssal

Reputation: 35

Add # To URL Redirect?

So I am making a test website just for practice and right now the website is accessible by clicking here. My first question is can I get the http:// to appear in the URL along with www? My second question is instead of having http://www.abyssaltest.hol.es/, I want it to be http://www.abyssaltest.hol.es/#/ and when it redirects to another page to be http://www.abyssaltest.hol.es/#/test. Is there anyway I can make either of these possible? Thanks.

Upvotes: 0

Views: 80

Answers (1)

randmin
randmin

Reputation: 948

Both things can be acomplished with apache's rewrite engine, however, to explicitly answer your question you might want to give some more information on your server configuration (i.e. are you using an online-server or do you work on a local ('usual') HTML-file? If on a server-> Apache? Microsoft?).

If you try to archieve this with bare HTML (or CSS / JS) it is not possible. Or at least I cannot imagine how to accomplish it, maybe javascript can help you to find a workaround, but this is unlikely plus it would only appear to be that "new" URL instead of actually sending the HTTP request to that destination.

Clearify your goal (e.g. what do you need this functionality for?) and I am sure there are many people willing to find a solution together ! Meanwhile, check out this article on .htaccess and mod_rewrite. (Especially the second example should be of use).

So long - happy coding!

Upvotes: 1

Related Questions