-2

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. :)

Sumurai8
  • 20,333
  • 11
  • 66
  • 100
  • 1
    If contactus is on the same page, you should use `#contactus`, not some fancy url. If the contactus page is a seperate page, you can possibly use the history api, but it is out-of-scope to give you a complete tutorial on how to use that. In any case, `.htaccess` is something server-side, and I don't see how it is related to your problem. – Sumurai8 Dec 08 '13 at 14:52
  • how would i do that @Juhana – emmansarsale Dec 15 '13 at 16:18
  • [Here are the instructions](http://stackoverflow.com/questions/824349/modify-the-url-without-reloading-the-page) – JJJ Dec 15 '13 at 17:00

2 Answers2

0

/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!

Renze
  • 36
  • 6
0

.htaccess file:

RewriteBase /

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/#(.*)$ index.php/$1
Uday Hiwarale
  • 4,028
  • 6
  • 45
  • 48