Forum Moderators: open

Message Too Old, No Replies

Url with mod_rewrite

which style does google like best?

         

mipapage

9:32 am on May 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Okay,

using mod_rewrite to clean up your dynamic URLS I see two possibilities:

www.widgets.com/faqs/aboutourwidgets/

or

www.widgets.com/faqs/aboutourwidgets.html

It's easier to see when the first method is used on websites, and I see it a lot. I've thought that representing your pages as directories would cause a loss in PR, but have seen some sites where this doesn't appear to be the case - ie: no loss as you move down directories. I suppose that this could be attributed to the fact that there are no actual directories, but does Google know this?

At any rate, has anyone used both methods and been able to see any difference with how Google views the pages?

percentages

9:40 am on May 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



mipapage,

I think it is advantageous to keep pages as high as possible from the root document.

I also see numerous sites with deep directory structures that maintain and in some cases increase their PR! But, analysis shows that the PR is gained from deep linked external links, not internal structure.

On the whole I would go for 100 internal pages linked from the root document in the root directory, 100 pages linked from each of those and 100 pages from each of those....etc.

The more deep links you can achieve from external sites the better.

futureX

3:05 pm on May 14, 2003 (gmt 0)

10+ Year Member



just use www.widgets.com/faqs/aboutourwidgets

mipapage

5:10 pm on May 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



futureX

I take it that you forgot to put the forward slash and not the .html, or are you saying to leave out the forward slash?

pixel_juice

5:12 pm on May 14, 2003 (gmt 0)

10+ Year Member



www.widgets.com/faqs/aboutourwidgets/ is better (with the forward slash, or your server may use a redirect) because this way your url doesn't have to change. Regardless of whether you change from html to php or whatever, you can always use that url.

mipapage

6:41 pm on May 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks pixel_juice,

But the url woudln't have to change if I use mod_rewrite to create

www.widgets.com/faqs/aboutourwidgets.html

either. I am doing the same thing, no? Just instead of putting it down that extra directory I would substitute an .html ending. And since I am not down that extra (theorhetical) directory, would that not be better?

Regardless of whether you change from html to php or whatever, you can always use that url.

Note that I am using .php, just rewriting to .html.

mipapage

6:41 pm on May 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



BTW percentages, thanks for your response. Not ignoring you, I get what you're gettin at!

pixel_juice

7:04 pm on May 14, 2003 (gmt 0)

10+ Year Member



But the url woudln't have to change if I use mod_rewrite to create

www.widgets.com/faqs/aboutourwidgets.html

I see what you mean, but leaving out the file extension seems to me to be a more long lasting solution. I guess in your case it doesn't matter a great deal what you use.

It doesn't make any difference how deep your directory structure is or appears to be - the whole PR/directory structure thing stems from toolbar 'guessed' PR, whereas real PR is calculated based on linking and not directory structure at all.

killroy

7:55 pm on May 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Why not write www.widgets.com/faqs/aboutourwidgets?

And would youp lease finally dispense the myth tha google gives a darn about directory structure? there is no such thing. URLs are homogeneous, each character means EXACTLY the same thing. Google isn't allowed by the standards to asume any form of structure form the URL.

You could wrtie the entire site with:
www.widgets.com/faqs-aboutourwidgets-html
and each page will have EXACTLY the same PR as
www.widgets.com/faqs/aboutourwidgets.html
or
www.widgets.com/faqs/aboutourwidgets
or
www.widgets.com/faqs/aboutourwidgets/
or
www.widgets.com/faqs/aboutourwidgets/blurb/googledeegoop/keywordspamming/in/url/

you get the point.

SN

ruserious

8:16 pm on May 14, 2003 (gmt 0)

10+ Year Member



Read [w3.org...]
or just google for "Cool uris don't change". ;)

IMHO leave out the file extension. It does not matter at all if you put a slash at the end or not. Only cosmetical reasons. If you know your way around mod_rewrite you can make it do whatever you want. Remember: "The great thing about mod_rewrite is it gives you all the configurability and flexibility of Sendmail. The downside to mod_rewrite is that it gives you all the configurability and flexibility of Sendmail." ;-)

Also real PR has nothing do with the number of slashes in your URI, or the depth of the directory. The only important thing is how many "steps"(ie. clicks) there are between the pages. Remeber that PR is page-based, not domain-based.
If a page is not in Google, then in your toolbar you will see a guessed PR which is in some form derived of the depth of the file. However that guessed PR only affects the width of the green PR on the toolbar of the users. It has nothing to with SERPS or real PR.

pixel_juice

9:07 pm on May 14, 2003 (gmt 0)

10+ Year Member



It does not matter at all if you put a slash at the end or not

Some linux servers return a 301 Moved Permanently to requests to www.domain.com/directory to www.domain.com/directory/

This doesn't seem to cause any real problems with search engines, but the two aren't the same. Also,leaving off the trailing slash has been reported to cause extra load on your server as it has to check whether it's a file and then looks for the default index document.

mipapage

9:11 pm on May 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It doesn't make any difference how deep your directory structure is or appears to be - the whole PR/directory structure thing stems from toolbar 'guessed' PR, whereas real PR is calculated based on linking and not directory structure at all.

you get the point.

Also real PR has nothing do with the number of slashes in your URI, or the depth of the directory. The only important thing is how many "steps"(ie. clicks) there are between the pages. Remeber that PR is page-based, not domain-based.
If a page is not in Google, then in your toolbar you will see a guessed PR which is in some form derived of the depth of the file. However that guessed PR only affects the width of the green PR on the toolbar of the users. It has nothing to with SERPS or real PR.

Well, flush out the blushing newbie!

Clearly a point that I missed in my first two months here. Okay, answer is simple then:

www.widgets.com/faqs/aboutourwidgets/

Thanks all for what has been a superinformative thread for me.

The great thing about mod_rewrite is it gives you all the configurability and flexibility of Sendmail. The downside to mod_rewrite is that it gives you all the configurability and flexibility of Sendmail.

Yes, it hurt my brain a bit last night but all is working well now. Except I finished with the .html solution, now I'll go back and change it! ;-]

ruserious

9:12 pm on May 14, 2003 (gmt 0)

10+ Year Member



However
Some linux servers return a 301 Moved Permanently to requests to www.domain.com/directory to www.domain.com/directory/

That is not default behaviour but can/must be configured in you httpd.conf or you .htaccess files(*). If you have Override All, you override that behaviour and rewrite www.domain.com/something to a file or whatever you want with a regular 200. Hence why I said "if you know your way around mod_rewrite" ...

(*)http://httpd.apache.org/docs/misc/FAQ.html#set-servername

killroy

9:52 pm on May 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In fact the redirection to the slashed version will ONLY happen on default directory/file behavior. if you mod_rewrote without trailing slash it already found the resource and won't redirect, in fact adding the slash will point it to a url which doesn't exist. web servers aren't that stupid ;)

Always try to remember that URLs have nothing to do with folders and files.... only that most consumer OSes use folders and files, and logn ago lazy academics couldn'T be bothered with designing a proper structure for their websites ;)

SN

futureX

11:46 pm on May 12, 2003 (gmt 0)

10+ Year Member



I'm not getting into any mod_rewrite discussions, but for indexing simplicity and longetivety i reccomend

www.widgets.com/faqs/aboutourwidgets

no trailing slash, just a file, doesnt confuse users or Bots, treads the dynamic url as a page, and no extensions. I'm bored of .html anyway, i've started just using .php instead, it looks better :P