Hi all,
It's been a while since my last visit...
The last couple days I've been working on a wallpaper site with back-end. Now I'm having troubles with the concept of URL variables and mod_rewrite
What I want:
/index.php -> /
/index.php?search=blue+orange&page2 -> /search/blue+orange/page/2/
/index.php?tag=blue&page=2 -> /tag/blue/page/2/
/index.php?category=vector&page=2 -> /category/vector/page/2/
/index.php?id=50&name=cool-wallpaper ->/view/50/cool-wallpaper/
/index.php?id=50&name=cool-wallpaper&download=960x800 -> /view/50/cool-wallpaper/download/960x800/
also,
www.domain.com should be redirected to domain.com and every URL must have a trailing slash, so tag/blue/page/2 should redirect to tag/blue/page/2/
search performs a MySQL search in "imagename" and "tags"
tag performs a MYSQL query where 50 wallpapers are shown and if necessary shows a pagination (&page=2)
category same as tag
I want all this in one file (or is it better not to?) How should I do this in in PHP?
What happens if someone altered the URL and typed in a wrong ID with a wallpaper, can I throw an error?
correct: /view/50/cool-wallpaper/
incorrect: /view/47/cool-wallpaper/
I know these are different questions, but I hope someone can help...
Thanks in advance for any answers, tips and hints
