Forum Moderators: phranque
http://www.site.com/book.php?id=19041
http://www.site.com/author.php?id=2058
http://www.site.com/series.php?id=18
http://www.site.com/list.php?type=book
http://www.site.com/search.php?item=david+weber
http://www.site.com/list.php?type=series&by=genre
Now, I understand that I need to use mod_rewrite to get the pages to be looked at by most spiders. What I don't get is how exactly do do it. I have looked at most, if not all the tutorials out there and they end up covering so much that I get really lost. Can anyone walk me through what I need to do to get the URLs to be crawled using only .htaccess?
Welcome to WebmasterWorld [webmasterworld.com]!
> what I need to do to get the URLs to be crawled using only .htaccess?
I'm afraid it can't *all* be done using .htaccess. Your .htaccess file is processed after an HTTP request is received but before any content is served or any scripts are run. What this means practically is that .htaccess on acts on the "front end" of a request. It can therefore change an incoming URL and rewrite it to a different URL or internal filename. But it cannot change anything about the output of the server, including script output.
In outline form, here's what you probably want to do:
This search [webmasterworld.com] will lead to dozens of threads on the subject.
Jim
Jim
[webmasterworld.com...]
The solution seems to have been that I need to extract parameters from the URL and use them in my PHP script, but surely I could do this without using mod_rewrite by using 'explode' on the URL? I was expecting that mod_rewrite would simply take my static URL (such as 'page/id/10') and using a Rewriterule then provide URL parameters that my PHP script would access just as if I'd used a URL with parameters ('page.php?id=10' for instance).
Am I wrong in my assumption that this is possible? I hope I have managed to explain this correctly, I realise that it is diffcult to explain what I am trying to achieve!
I greatly appreciate any insight given!
Rick