Meta-PokéBase Q&A
0 votes
176 views

I like how your site works where you can go to the /pokedex/bulbasaur page and not deal with a lot of code in the url bar. I've been looking to do something like this with a site and can't quite figure url rewriting out, would you reccomend I look into mod rewrite more or maybe something like views with zend? Thanks, Dan

related to an answer for: How did you make this site?
by

1 Answer

1 vote

I use a PHP framework called CodeIgniter to build the site, which has clean URLs built in. It uses the htaccess file.

But you could do something like this in htaccess:

RewriteRule    /pokedex/([a-z0-9-]+)    /pokedex.php?pokemon=$1

And then have a script, pokedex.php that handles everything.

by