Need some quick help with mod rewrite

Discussion in 'PHP' started by japindian, Jul 8, 2008.

  1. #1
    I've been trying for an hour now but my mod rewrite just isn't working. I talked to my host but he says it's a problem with my syntax. Could someone please tell me what I'm doing wrong?
    I tried the simple way, then after reading a bit I did this:
    RewriteRule ^articles/([^/\.]+)/?$ category/articles-on-censorship/[L]
    And it still didn't work

    I'm trying to go from /articles to category/articles-on-censorship/
    Can someone help me please?
     
    japindian, Jul 8, 2008 IP
  2. mab

    mab Active Member

    Messages:
    563
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    80
    #2
    hmm i don't know why i feel that's wrong too ..
     
    mab, Jul 8, 2008 IP
  3. japindian

    japindian Peon

    Messages:
    666
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #3
    My fault I worded my post badly; I meant I read up on it and it still didn't work, so ya it is wrong :). Do you know the right way?
     
    japindian, Jul 8, 2008 IP
  4. japindian

    japindian Peon

    Messages:
    666
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Does anyone know how to fix this
     
    japindian, Jul 8, 2008 IP
  5. Vooler

    Vooler Well-Known Member

    Messages:
    1,146
    Likes Received:
    64
    Best Answers:
    4
    Trophy Points:
    150
    #5
    Vooler, Jul 8, 2008 IP
  6. japindian

    japindian Peon

    Messages:
    666
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #6
    actual: screwcensorship.com/articles
    moded: screwcensorship.com/articles to category/articles-on-censorship/
     
    japindian, Jul 8, 2008 IP
  7. Vooler

    Vooler Well-Known Member

    Messages:
    1,146
    Likes Received:
    64
    Best Answers:
    4
    Trophy Points:
    150
    #7
    Sorry I dont quite understand what you need "articles to category", the urls that is actual is already good for SEO. Most users need to shorten or translate urls so that they look static, but this te example you posted it is quite misleading. Please provide more details.

    regards
     
    Vooler, Jul 8, 2008 IP
  8. japindian

    japindian Peon

    Messages:
    666
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Ok. Basically for me to make a "page" that links to the articles I've written I need to unSEO kind of. In wordpress if you try to make a page you cannot put any spaces,punctuation,slashes,etc. So therefore i put articles. Now the actual link for articles is the one i want to forward to which is the category i made for articles "articles on censorship"
     
    japindian, Jul 8, 2008 IP
  9. Vooler

    Vooler Well-Known Member

    Messages:
    1,146
    Likes Received:
    64
    Best Answers:
    4
    Trophy Points:
    150
    #9
    This way it will redirect all aritcles to same category you pust statically. Besides, wordpress already has a builtin method of doing this thing.

    I think this will do the job. If no, dont worry I did not give up, let me know. But still following is not understandable for me:

    regards
     
    Vooler, Jul 8, 2008 IP
  10. japindian

    japindian Peon

    Messages:
    666
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #10
    See thats the problem, thats how I already set up my wordpress. Doing that gives you a link like this:screwcensorship.com/category/articles-on-censorship/ HOWEVER I cannot make this a PAGE (for example as you can see on the top of my page screwfirewalls) To make a page it needs to be a single word without any symbols. That is why I must make a page /articles which forwards to /category/articles-on-censorship/
     
    japindian, Jul 8, 2008 IP