+ Reply to Thread
Results 1 to 3 of 3

Thread: rule for .htaccess mod_rewrite

  1. #1
    lalit_7 is offline x10Hosting Member lalit_7 is an unknown quantity at this point
    Join Date
    Jul 2011
    Posts
    2

    Question rule for .htaccess mod_rewrite

    hi everyone i want ot make my url search engine friendly.Currently my url looks like this:
    http://www.affiliateclubhouse.com/af...ubid=Body+Care

    i want it to :
    http://www.affiliateclubhouse.com/af...ml/Beauty/Body Care


    What rule should i write in my .htaccess....
    And also please anyone can tell me how to write the rules using mod_rewrite....
    Thsnk you in advance for your help...

  2. #2
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: rule for .htaccess mod_rewrite

    So called "search engine friendly URLs" aren't always that. The reason for rewriting URLs is so they're RESTful. Focus on users & standards and the rest will come. Read Google's official position on URLs.

    The path portion of URLs is hierarchical. You should be using rewrites only if the named cid is a category containing the named subid, and is in turn contained by "affiliate-programs-directory". If the page content doesn't vary depending on the cid and subid, keep them as query parameters.

    This particular set-up is so simple I'm going to recommend you first read a rewriting tutorial, such as Apache's rewrite guide. You'll also need to remove the ".html" from the public URL. By the way, that better not be some script (e.g. PHP) where you've configured every HTML page to be processed by PHP. If so, you should rename all the PHP scripts to have the PHP extension, then use rewrites (or content negotiation, via MultiViews) to remove the extension from URLs (what are sometimes called "clean URLs").
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  3. #3
    gouri78's Avatar
    gouri78 is offline x10Hosting Member gouri78 is an unknown quantity at this point
    Join Date
    Jul 2011
    Location
    India
    Posts
    71

    Re: rule for .htaccess mod_rewrite

    can go through
    http://corz.org/serv/tricks/htaccess2.php
    try may help !

+ Reply to Thread

Similar Threads

  1. .htaccess mod_rewrite
    By shamildx85 in forum Free Hosting
    Replies: 4
    Last Post: 12-16-2010, 08:00 AM
  2. htaccess mod_rewrite help
    By nterror in forum Programming Help
    Replies: 2
    Last Post: 05-20-2009, 09:14 AM
  3. .htaccess and mod_rewrite
    By viperfx in forum Free Hosting
    Replies: 6
    Last Post: 10-23-2007, 09:00 AM
  4. use mod_rewrite and .htaccess
    By vilsushf in forum Free Hosting
    Replies: 1
    Last Post: 10-06-2007, 12:59 PM
  5. .htaccess rewrite rule
    By theblazingangel in forum Scripts & 3rd Party Apps
    Replies: 2
    Last Post: 03-03-2006, 11:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers