• 0

"pretty" urls?


Question

9 answers to this question

Recommended Posts

  • 0

They're known as FURLs or "Friendly URLs"

Personally I used mod_rewrite for a site... but that was ages ago. Can't really say I remember my configuration anymore. All I remember is that it wasn't easy to work with.

Link to comment
Share on other sites

  • 0

They're known as FURLs or "Friendly URLs"

Err, they're known as pretty URLs as well.

Uplift, best thing to use is mod_rewrite. If you've got .htaccess, you can use the following to rewrite /portfolio.php?web=sitename.

 RewriteEngine on
RewriteRule ^portfolio/([^/\.]+)/?$ ./portfolio.php?web=$1 [L]

That would rewrite it to just /portfolio/sitename. Unless you want/need the extra /web/?

Link to comment
Share on other sites

  • 0

Err, they're known as pretty URLs as well.

Uplift, best thing to use is mod_rewrite. If you've got .htaccess, you can use the following to rewrite /portfolio.php?web=sitename.

 RewriteEngine on
RewriteRule ^portfolio/([^/\.]+)/?$ ./portfolio.php?web=$1 [L]

That would rewrite it to just /portfolio/sitename. Unless you want/need the extra /web/?

I would prefer the web part it will help categorise and sort

Thanks.

Link to comment
Share on other sites

  • 0

i cant get my head around it.

is there a regular expression for something like

home.php => /home

contact.php => /contact

about.php => /about

or even individually

RewriteEngine on

RewriteRule ^contact/([^/\.]+)/?$ ./contact.php [L]

Link to comment
Share on other sites

  • 0

still can't do it lol - anyone?

this is ultimately what i'm after:

first up i just want basic pages changing eg:

about.php => /about

contact.php => /contact

services.php => /services

then i'll want something a little more complex eg:

portfolio.php => /portfolio

portfolio.php?cat=web => /portfolio/web

portfolio.php?web=sitename => /portfolio/web/sitename

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.