1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Peoblem In Url Redirection

Discussion in 'Search Engine Optimization' started by Fadz, Jul 28, 2007.

  1. #1
    I have a few urls set up like this within eg

    http://www.mydomain.com/user_text.php?name=Funny

    does anybody know what to put in the htaccess file so that it'll make the urls like:



    http://www.mydomain.com/Funny


    or


    http://www.mydomain.com/funny.html
    http://www.mydomain.com/funny.htm
    http://www.mydomain.com/funny.shtml


    any one
     
    Fadz, Jul 28, 2007 IP
  2. easywab

    easywab Peon

    Messages:
    262
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    easywab, Jul 28, 2007 IP
  3. Fadz

    Fadz Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    pnly putting this
    RewriteRule ^(.*) /user_text.php?name=$1
    in .htaccess sure
     
    Fadz, Jul 28, 2007 IP
  4. Fadz

    Fadz Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    No pRofit Gained
    not done
     
    Fadz, Jul 28, 2007 IP
  5. Fadz

    Fadz Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    have a few urls set up like this within eg

    http://www.mydomain.com/user_sms.php?id=45

    does anybody know what to put in the htaccess file so that it'll make the urls like:



    http://www.mydomain.com/45

    or


    http://www.mydomain.com/45.html
    http://www.mydomain.com/45.htm
    http://www.mydomain.com/45.shtml


    any one help me plz
     
    Fadz, Jul 28, 2007 IP
  6. Karthik

    Karthik Peon

    Messages:
    76
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    If your .htaccess is blank, add this:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^(.+).html user_text.php?name=$1 [L,NC,R=301]

    Or, if it already has the first two lines, just add the third line.
     
    Karthik, Jul 28, 2007 IP
  7. Fadz

    Fadz Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    # -FrontPage-

    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
    <Files gallery>


    ForceType application/x-httpd-php
    </Files>
    <Limit GET POST>
    order deny,allow
    deny from all
    allow

    from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName

    www.efreesms.com
    AuthUserFile /home/efreesms/public_html/_vti_pvt/service.pwd
    AuthGroupFile

    /home/efreesms/public_html/_vti_pvt/service.grp


    RewriteEngine On
    RewriteBase /
    RewriteRule ^(.+).html user_sms.php?id=$1 [L,NC,R=301]

    still not done
    visit http://www.efreesms.com
     
    Fadz, Jul 28, 2007 IP
  8. Karthik

    Karthik Peon

    Messages:
    76
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Are you sure you have mod_rewrite enabled by your host?
     
    Karthik, Jul 28, 2007 IP
  9. Fadz

    Fadz Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Fadz, Jul 28, 2007 IP
  10. easywab

    easywab Peon

    Messages:
    262
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #10
    What is your requirement , Redirect or Rewrite?

    Don't put [R=301] if you need rewrite...

    this is the correct way,
    RewriteRule ^(.*).html /user_sms.php?name=$1 [NC]

    I have tested above thing in my web server... It worked , I use .htaccess.
    It is easy because we don't need to restart apache each time we do changes.
     
    easywab, Jul 28, 2007 IP