FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


RewriteRule .htaccess





traxion
hey all

for a website i got in the links a href=#top so that when i press a link i get back to the top of the page.

now i've got a problem because its also on the URL. so its not www.domein.nl/ but www.domein.nl/#top

and that is ugly. so i want it away, now ive read that u can do that with a .htaccess file and the rewriterule but i cant realy find online a way to get it right.

does anybody here now how to fix it??

(mod_rewrite is active on the server so it should work)
Fire Boar
No. The reason being that the # part isn't used by the server, but by the browser. So # isn't actually part of the url - it only points the browser to where it should start. However, it is possible to use javascript instead of HTML to scroll the client's browser to a certain point on your page... but that's not good for people who don't use javascript.
traxion
damm.. i almost got the rewrite think working on a testpage Sad


a good javascript option is no problem because the site runs on ajax so i need to have javascript to use it already (and everybody has javascript now a day)

do u have any idee how i can do that with javascript

--------------------


ive been experians that when i put only a # in the href of the link and a "<a name=""></a>" on the top of the index file

i get domein.nl/#

so thats better but if the # could be gone
rvec
http://www.codelifter.com/main/tips/tip_019.shtml

Smile

BTW I am Yaron on your forum, nice to see you working on it Razz
traxion
thnx man..

way isn't the solution always so simple:D
Akito
traxion wrote:
thnx man..

way isn't the solution always so simple:D


Naw they couldn't have a solution for AIDs and stuff. Very Happy

But anyways good luck
Related topics
Google and Domains: help
Give each user a sub directory?
More Domain Help Needed
mod_rewrite code
change to static url
How to redirect to a particular directory
.htaccess (Mod Rewrites/Regex)
General .htaccess tutorial.
Pagination with .html extension
rewrite rule htaccess
.htaccess... Somebody help me!
.htaccess problem in wordpress
Mod Rewrite .htaccess
301 redirection in PHP and .htaccess
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.