Welcome to WebmasterWorld Guest from 54.167.65.247

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

How to hide the website address

     
11:11 am on Jun 19, 2010 (gmt 0)

New User

5+ Year Member

joined:June 19, 2010
posts:4
votes: 0


Hi,

I am going to build up a online shop and selling some products,

the site is developed using php and i would like to hide the filename of the name, e.g.

from

www.mysite.com/car/list1.php


to

www.mysite.com/car/


how can i do?

thanks
12:13 pm on June 19, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Feb 22, 2009
posts:1396
votes: 0


Hi there hihidavid,

The word you are after is mod_rewrite this is used to mask the technology used and is good to make urls seo friendly.

Give the apache forum a try as it is a module on there. Hope that helps.

Cheers.
MRb
9:59 pm on June 19, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
posts:7999
votes: 0


And before you look, this is "the most common mistake" - this is backwards.


www.mysite.com/car/list1.php
to
www.mysite.com/car/


You write from the link, www.mysite.com/car/ to the script, www.mysite.com/car/list1.php

RewriteRule ^/car\/*$ /car/list1.php [L]

Of course, one wouldn't hard code it like that, you'd use some sort of regexp to manage hundreds of URL's with one or two lines, but that's the idea . . .
7:48 am on July 2, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:Mar 24, 2007
posts: 138
votes: 0


I just wanted to put it out there that you could design your site with CSS and use javascript to load new content into a centrally located div . Your page address will appear unchanged. and you can accomplish this without the use of frames.
Just a thought.
9:07 am on July 2, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Feb 22, 2009
posts:1396
votes: 0


Hi there capulet_x,

>>I just wanted to put it out there that you could design your site with CSS and use javascript to load new content into a centrally located div

Interesting, though I would think a tad impractical, especially when you consider that a lot of people nowadays turn of JS because of all the pop-ups and other intrusions that come from sites, the easiest way to go with this is from a server-side using rewrite rules.

Cheers,
MRb
9:59 am on July 2, 2010 (gmt 0)

Moderator from GB 

WebmasterWorld Administrator mack is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:June 15, 2001
posts:7583
votes: 11


also, by having all pages loaded onto one page, how would search engines be able to crawl the specific pages, when they all use the same address in the url bar. Use a method where each page has a unique url.

Mack.
6:44 pm on July 2, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:Mar 24, 2007
posts:138
votes: 0


I agree with you guys and I admit that there was a trade-off with the proposed solution. I think that is why I hesitated to post it but I know I've also been in situations where I just need to have something online even if I had to continue developing it to function optimally. That being said, I haven't had the same experience in my browser choices with pop-up issues or unwanted javascript executing and so it didn't occur to me that "a lot of people nowadays turn off JS" but I will consider that factor in the future.
8:59 pm on July 2, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


Using extensionless URLs with a matching rewrite is the way to go.