문제

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

도움이 되었습니까?

해결책

.htaccess file:

RewriteBase /

RewriteEngine On
RewriteBase /

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

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top