Domanda

can someone please help me with this I want to make a url like this

http://www.website.com/#contactus

and would become and display a clean URL like this

http://www.website.com/contactus

but it will function the same as the hash url. Like when i include some jquery slides to it..

when i click

<a href="http://www.website.com/contactus">Contact Us</a>

it would slide to the div with id of contactus

<div id="contactus"></div>

without refreshing the page but it would change the url.

What tools will i use. Please guide me thank in advance. :)

È stato utile?

Soluzione

.htaccess file:

RewriteBase /

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/#(.*)$ index.php/$1

Altri suggerimenti

/contact us sends you to the index.html/php or whatever in a folder called contact, but you could try some things using

return false

good luck!

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top