Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Open Source > Linux
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 5th, 2005, 04:58 AM
Friend of Wrox
 
Join Date: Mar 2004
Location: Bhopal, MP, India.
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.

Quote:
quote:Permalink
Special thanks.

__________________
`~@#\^%&*/\.<.\/-|+|_!:;..=?>
PHP, SEO | anshul shrivastava | mediasworks.org | FB
Reply With Quote
  #2 (permalink)  
Old October 13th, 2005, 06:19 PM
Friend of Wrox
Points: 1,515, Level: 15
Points: 1,515, Level: 15 Points: 1,515, Level: 15 Points: 1,515, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2003
Location: Oxford, , United Kingdom.
Posts: 488
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Here's the .htaccess file from ruby on rails, should get you started.
http://dev.rubyonrails.com/file/tool...blic/.htaccess

The O'Reilly 'Mastering regular expressions' book is highly recommended - take a look at the sample chapter:
http://www.oreilly.com/catalog/regex/chapter/ch04.html

HTH Charlie

--
Don't Stand on your head - you'll get footprints in your hair
                                           http://charlieharvey.org.uk
                                              http://charlieharvey.com
Reply With Quote
  #3 (permalink)  
Old October 14th, 2005, 09:09 AM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

I posted an article on my own experiences with this not too long ago:
http://p2p.wrox.com/topic.asp?TOPIC_ID=31036

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.

HTH!

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 05:58 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.