1
snakes
Nice URLs without .htaccess and mod_rewrite (url rewriting)
  • 2005/10/14 9:58

  • snakes

  • Just popping in

  • Posts: 69

  • Since: 2004/8/8 0


hi there.

There were some hacks and modules that permit you to have nice urls:
Quote:
http://www.mysite.com/modules/myMod/index/65/xoops-is-cool
instead of
http://www.mysite.com/modules/myMod/index.php?newsid=65&msg=xoops-is-cool

To make this you have to use the url rewriting with .htaccess file.

I've discovered that you can do this without that!
Just test this, visit this site:
https://xoops.org/index.php
and now visit this one:
https://xoops.org/index.php/65/xoops-is-cool
You may notice that these are the same page.
In fact, apache is looking at the URL and travels from directories to sub directories etc... if one of those supposed directories is a file then it just open that file and ignore the rest of the URL.
Inhttps://xoops.org/index.php/65/xoops-is-cool, index.php is an existing file so /65/xoops-is-cool is ignored.
Using this URL format you can get /65/xoops-is-cool using $PHP_SELF variable.

Ciao

2
studioC
Re: Nice URLs without .htaccess and mod_rewrite (url rewriting)
  • 2005/10/14 10:25

  • studioC

  • Friend of XOOPS

  • Posts: 922

  • Since: 2003/12/7


but... what do you want to achieve with that?

uh .. in this way you can show many sites of same content. Did you ever thought about that searchengines will not like those "virtual dublicate content" pages?

I wouldn't advise anyone to link on his pages this way. Or, especially, not on 2 or more different ways. Google will note this as a supplemental result.

using .htacces to rewrite urls is not the only thing if pathes and existing links to pages without rewrites are still there isn't it?

michael

3
snakes
Re: Nice URLs without .htaccess and mod_rewrite (url rewriting)
  • 2005/10/14 10:36

  • snakes

  • Just popping in

  • Posts: 69

  • Since: 2004/8/8 0


The objective it not to have multi links to the same page but to have URL that are nicers than having tons of ? and & in the query string.

Those who are hosted by mod_rewrite supported host will still use url rewriting, those who don't have support of this may use this way

Login

Who's Online

217 user(s) are online (132 user(s) are browsing Support Forums)


Members: 0


Guests: 217


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits