The Silicon Underground
  Welcome to Dave Farquhar's Silicon Underground Friday, July 25 2008 @ 02:38 PM CDT  
Theme Changer
Change the look of the site by selecting a theme below:

What's New
STORIES
1 story in last 24 hours

COMMENTS last 48 hrs
No new comments

LINKS last 2 wks
No recent new links

Google Ads

User Functions
Username:

Password:

Don't have an account yet? Sign up as a New User

Firefox


Any Unix gurus care to help me with mod_rewrite?   
Monday, September 06 2004 @ 08:53 AM CDT
By David L. Farquhar

I've watched my search engine traffic decrease steadily for the past few months since I changed blogging software. It seems most engines don't care much for the super-long arguments this software passes in its URLs.

The solution is mod_rewrite, and I think my syntax looks correct, but it's not working for me.

The goal is to fake out search engines to make them think they're looking at static files. Search engines are reluctant to index database-driven sites for fear of overloading the site. Since I can't tell them not to worry about it, I have to make the site look like a static site.

To that end, I created a section at the end of my httpd.conf file:

# rewrites for GL

RewriteEngine on
RewriteRule ^/article/([0-9]+)$ /article.php?id=$1 [NC,L]

This line should make the software respond to Thursday's entry (http://dfarq.homeip.net/article.php?story=20040902200759738) if it's addressed as http://dfarq.homeip.net/article/20040902200759738.

Once mod_rewrite is working, in theory I can modify the software to generate its links using that format and watch the search engines take more of a liking to me again. But I've got to get mod_rewrite going first, and I'm stumped. Any expert advice out there? Thanks in advance.

  [ Views: 1018 ]  


Any Unix gurus care to help me with mod_rewrite? | 5 comments | Create New Account
The following comments are owned by whomever posted them. This site is not responsible for what they say.
Any Unix gurus care to help me with mod_rewrite?
Authored by: DaveF on Monday, September 06 2004 @ 11:23 AM CDT
Just to clarify, I do have the module installed and enabled:

LoadModule rewrite_module /usr/lib/apache/1.3/mod_rewrite.so

I wish it were as simple as me overlooking that. :(

[ Reply to This ]

Any Unix gurus care to help me with mod_rewrite?
Authored by: dcook32p on Monday, September 06 2004 @ 07:14 PM CDT
I don't know too much about it, but the documentation says it should be 'pattern' and then 'substitution'. Looks like you have it backwards... I don't know about the rest of it.

---
Dustin D. Cook, A+
dcook32p@htcomp.net

[ Reply to This ]

Any Unix gurus care to help me with mod_rewrite?
Authored by: SteveD on Monday, September 06 2004 @ 09:01 PM CDT

Try changing the param name to article.php in the substitution to "story" instead of "id":

RewriteRule ^/article/([0-9]+)$ /article.php?story?=$1 [NC,L]

That might be the only problem. Your regular expression appears to be OK.

[ Reply to This ]

What's Related
  • http://dfarq.homeip.net...
  • http://dfarq.homeip.net...
  • More by DaveF
  • More from Apache

  • Story Options
  • Mail Story to a Friend
  • Printable Story Format


  • Calendar
    July 2008
    SuMoTuWeThFrSa
    29
    30
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    1
    2
    Click on any day to see postings and events for that date.

    Referrals

    Top 10 by Comments
    Story TitleComments
    Cheap laptops from Sotec 253
    An untrustworthy vendor 164
    Upgrading an eMachine 125
    eMachine upgrade advice 99
    Why I dislike Microsoft 51
    Upgrade diary: Gateway G6-400 35
    And we're live 30
    The day after the Columbia 22
    How to pray 22
    CD-ROM troubleshooting under Windows 9x 20

    Top 10 Read
    Story TitleViews
    eMachine upgrade advice 65964
    Upgrading an eMachine 56372
    How to view a blg file in Windows 2000 36051
    Cheap laptops from Sotec 28865
    Upgrade diary: Compaq Presario 7360 17503
    Upgrade diary: Gateway G6-400 16383
    CD-ROM troubleshooting under Windows 9x 13465
    Finding an open-source alternative to Ghost 11439
    Big trouble 10696
    Salary cap? Baseball needs something 10158

    Topics
    Home
    Apache (2)
    Baseball (59)
    Book reviews (2)
    Business (1)
    Christianity (57)
    Cooking (1)
    Copyright (15)
    Curmudgeonry (1)
    Design (7)
    DOS (6)
    Games (4)
    Genealogy (10)
    General (494)
    Hardware (143)
    Health (13)
    Human Interest (9)
    Humor/Satire (19)
    Journalism (1)
    Linux (92)
    Macintosh (22)
    Model Building (2)
    Music (32)
    net.culture (40)
    Personal (77)
    Photography (6)
    Retro Computing (24)
    Saving money (51)
    Servers and Networking (17)
    Society (45)
    Software (47)
    Spam (13)
    St. Louis (23)
    This weblog (14)
    Toy trains (72)
    Troubleshooting (7)
    Vendors (6)
    Video (20)
    Viruses (12)
    Windows (116)
    Writing (16)

    Older Stories
    Friday 13-Jun
  • Fathers: Give your family a gift this Father's Day weekend (0)

  • Wednesday 11-Jun
  • $13.99 a day for three days isn't $39 total! (0)
  • Registry optimization (0)

  • Tuesday 03-Jun
  • How eBay is ruining itself (0)

  • Sunday 01-Jun
  • More on Manhunt, plus revisiting Dr. Mudd (0)

  • Saturday 31-May
  • A book I've been meaning to read for a very long time (0)
  • Escape from Windows 98 (0)

  • Thursday 22-May
  • How Generation X can take this country back (1)

  • Tuesday 13-May
  • My poor-man's SSD boots DOS really fast (0)
  • One solution to the family IT man problem: Standardize (0)

  • Who's Online
    Guest Users: 4

    Syndicate!
    Get your RSS/RDF fix here.

    List of all stories
    Click here for a list of all the entries on this site


    Created this page in 0.83 seconds


     Copyright © 2008 Dave Farquhar's Silicon Underground
     All trademarks and copyrights on this page are owned by their respective owners.

    Powered by GL 1.3.x