Results 1 to 2 of 2

Thread: .htaccess Problem

  1. #1
    ProxySites.ca's Avatar
    ProxySites.ca is offline Newbie Net Builder
    Join Date
    Jul 2009
    Location
    ProxySites.ca
    Posts
    241
    Thanks
    29
    Thanked 3 Times in 3 Posts

    .htaccess Problem

    Hey guys,

    I am having a slight problem.

    I am trying to post articles to my website now and when I post them I want the name of the article to be the URL

    Right now it is
    mysite.org/page/2.html

    Instead I would like it to be
    mysite.org/article-title

    And in the .htaccess here is what is listed for page
    RewriteRule ^page/([0-9]+)\.html$ page.php?p=$1

    Any thoughts?

    Thanks!

  2. #2
    nux
    nux is offline Moderator
    Join Date
    Dec 2008
    Location
    Minneapolis
    Posts
    534
    Thanks
    28
    Thanked 77 Times in 54 Posts
    You will need to include the page ID # in the URL in order to have this work without rewriting code...something like this could work:

    mysite.org/2/article-title

    RewriteRule ^([0-9]+).$ page.php?p=$1

    Now I'm no pro with mod_rewrite, and this hasn't been tested.

    Just throwing it out there quick.
    Submit Your Proxies @ NewProxySites.com

Similar Threads

  1. How To Update .htaccess
    By garfish in forum Wordpress
    Replies: 7
    Last Post: 9 January, 2010, 11:48 AM
  2. .htaccess / redirect to 'www.'
    By Snak3 in forum On-Site SEO
    Replies: 12
    Last Post: 30 December, 2009, 19:13 PM
  3. .htaccess
    By dodolls in forum Managing
    Replies: 6
    Last Post: 15 November, 2009, 06:58 AM
  4. Strange .htaccess Problem
    By TopDogger in forum Programming
    Replies: 2
    Last Post: 19 October, 2009, 12:43 PM
  5. .htaccess help
    By Sami4u in forum Building
    Replies: 3
    Last Post: 14 September, 2009, 13:47 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •