Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Open Source > Linux
Linux General discussion of programming the various flavors of Linux operating systems.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Linux section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 5th, 2005, 04:58 AM
Friend of Wrox
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default Apache mod_rewrite()

I've used blogs: WordPress, b2evolution on Apache. These use permalinks/static urls. I guess they fetch urls from database and write rewrite rules into .htaccess files using PHP.
My request from the experts here, is to show few examples to make urls static using .htaccess file.?Once, we've the key concepts, we can manipulte .htaccess file using PHP, to make our Web pages, SE friendly. This is exactly, the blogs, I've mentioned do.

Apache documentation for mod_rewrite() is dry, and I'll be very glad, if you provide me few examples here.( I'll test myself )

Please provide few nice urls for learning regular expressions and Apache mod_rewrite() module functions.

Special thanks.

PHP, SEO | anshul shrivastava | mediasworks.org | FB
Old October 13th, 2005, 06:19 PM
Friend of Wrox
Join Date: Dec 2003
Posts: 488
Thanks: 0
Thanked 3 Times in 3 Posts

Here's the .htaccess file from ruby on rails, should get you started.

The O'Reilly 'Mastering regular expressions' book is highly recommended - take a look at the sample chapter:

HTH Charlie

Don't Stand on your head - you'll get footprints in your hair
Old October 14th, 2005, 09:09 AM
richard.york's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts

I posted an article on my own experiences with this not too long ago:

Basically what I did was bypass normal 404 error handling, so that when a request comes in for a document that doesn't exist, I forward that to a PHP script where I dissect the URL and serve the appropriate content. It's pretty much the same as creating your own database-driven file system.

Let me know if you have any questions.



Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design

Similar Threads
Thread Thread Starter Forum Replies Last Post
mod_rewrite stevenpup ASP.NET 2.0 Basics 2 December 22nd, 2007 05:54 PM
mod_rewrite question harpua Pro PHP 0 April 12th, 2007 08:56 PM
Mod_rewrite heerajee Pro PHP 1 March 8th, 2006 06:35 AM
mod_jk + apache + mod_rewrite fanch Apache Tomcat 0 December 5th, 2005 12:34 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.