Welcome to WebmasterWorld Guest from 54.166.152.121

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)

5+ Year Member



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 Jun 19, 2010 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



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 Jun 19, 2010 (gmt 0)

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



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 Jul 2, 2010 (gmt 0)

5+ Year Member



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 Jul 2, 2010 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



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 Jul 2, 2010 (gmt 0)

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



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 Jul 2, 2010 (gmt 0)

5+ Year Member



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 Jul 2, 2010 (gmt 0)

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



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

Featured Threads

Hot Threads This Week

Hot Threads This Month