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.

Need Help with .htaccess file url rewriting

Discussion in 'Programming' started by GURU4SEO, Apr 14, 2012.

  1. #1
    hello

    i need some help with htaccess url rewrite

    i want this
    when user open the url

    www.mywebsite.com/12345

    then he get redirected to the page

    www.mywebsite.com/index.php?id=12345

    and when user opens

    www.mywebsite.com/anyfolder/12345

    then he get redirected to

    www.mywebsite.com/anyfolder/index.php?id=12345



    plz help me about this
    what code i should use in htaccess file to get this thing working
     
    GURU4SEO, Apr 14, 2012 IP
  2. javamazon

    javamazon Active Member

    Messages:
    50
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    66
    #2
    RewriteEngine OnRewriteCond %{HTTP_HOST} ^(www\.)?domainnamehere\.com [NC]RewriteRule ^(.*)$ http://%{HTTP_HOST}/inder.php/$1 [R=301,L]Just give a try
     
    javamazon, Apr 19, 2012 IP
  3. Uploadables

    Uploadables Peon

    Messages:
    100
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    RewriteEngine
    OnRewriteCond %{HTTP_HOST} ^(www\.)?domainnamehere\.com [NC]
    RewriteRule ^(.*)$ http://%{HTTP_HOST}/index.php/$1 [R=301,L]
     
    Uploadables, Apr 21, 2012 IP