Activity Stream
48,167 MEMBERS
62821 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 4 of 4
  1.     
    #1
    Banned

    Default Php,MYSQL and htaccess

    hello people,
    me needing some help here.i have built my own custom coded CMS for blogging.i could have used the same old wordpress ,themes,but the intention was to learn the php,sql system. the platform has been developed and its working as it should.but i`m unable to modify the url structure

    current structure =
    Code: 
    site.com/view.php?id=3
    Using htaccess and much researching, i modified it to
    Code: 
    sitecom/view/3.html
    this one variable(so as to speak - id) is working well.now i wanna include some seo optimized keywords in the URL.As soon the post is created in the admin panel,the seo optimized key words will be added to that field in the table,say "SLUG".
    i can make the url
    Code: 
    site.com/view.php?id=3&slug=seo-optimized
    but i read its not friendly with server as it has to load both the fields to make a match.

    now my question is ,is it possible to
    make the url patter
    Code: 
    site.com/view.php?id=3
    and modify it via htaccess to

    Code: 
    sitecom/view/3.html
    so i want to know how it can be modified to

    Code: 
    sitecom/view/3/article-name-from-slug-field.html
    Regards


    EDIT1:I have gone through the system of wordpress ,but there are so many functions,its complicating the thing even more
    sceneguy Reviewed by sceneguy on . Php,MYSQL and htaccess hello people, me needing some help here.i have built my own custom coded CMS for blogging.i could have used the same old wordpress ,themes,but the intention was to learn the php,sql system. the platform has been developed and its working as it should.but i`m unable to modify the url structure current structure = site.com/view.php?id=3Using htaccess and much researching, i modified it to sitecom/view/3.htmlthis one variable(so as to speak - id) is working well.now i wanna include some seo Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    paste here your current htaccess rewrite rules

  4.     
    #3
    Member
    Something like this will do it for you:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule view/([0-9]+)/(.+)\.html$ view.php?id=$1&slug=$2
    </IfModule>

  5.     
    #4
    Banned
    thanks for help deliteblogger. i`ll try it and get back to you. Wont the server load be increased if it requires
    1.int ID to match
    2.slug STRING to match?

    Can i not match ID field and then redirect it to the respetive field
    Code: 
    sitecom/view/3/article-name-from-slug-field-for-post-id-3.html

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. MYSQL Error while Import via MYSQL Dumper (Error
    By desibreaker in forum Server Management
    Replies: 10
    Last Post: 5th Aug 2011, 07:26 PM
  2. Vb Seo .htaccess Help
    By sunnyx12x21x in forum vBulletin
    Replies: 9
    Last Post: 17th Jul 2011, 11:25 AM
  3. .htaccess Help Please
    By l0calh0st in forum Web Development Area
    Replies: 3
    Last Post: 4th Apr 2011, 03:29 PM
  4. Help with .htaccess
    By woja in forum vBulletin
    Replies: 1
    Last Post: 25th Jan 2011, 11:11 PM
  5. .htaccess Help
    By ICanSurfNow in forum Technical Help Desk Support
    Replies: 14
    Last Post: 19th Feb 2010, 10:18 AM

Tags for this Thread

BE SOCIAL