.htaccess mod_rewrite rules

Discussion in 'Water Cooler' started by John, Jun 9, 2009.

  1. John

    John Regular Member

    Joined:
    May 23, 2009
    Messages:
    757
    Likes Received:
    87
    Location:
    Tennessee
    Don't really know were to post this but I need some help with .htaccess mod_rewrite because I do not know how it should look.


    I want following links to be rewritten.

    home.php >> x/
    api.php?create=[VALUE] >> x/api/create/[VALUE]/
    api_example.php >> x/api/example/
    dashboard/login.php >> x/dashboard/login/
    dashboard/signup.php >> x/dashboard/signup/
    dashboard/logout.php >> x/dashboard/logout/
    dashboard/index.php >> x/dashboard/
    dashboard/index.php?page=newshortlink >> x/dashboard/new/
    dashboard/index.php?page=account >> x/dashboard/account/
    dashboard/index.php?page=delshortlink >> x/dashboard/delete/
    dashboard/index.php?page=del&action=delete&id=[VALUE] >> x/dashboard/delete/[VALUE]/

    Hope someone that is good on this can help me.
     
  2. Bundy

    Bundy Admin Talk Staff

    Joined:
    Apr 19, 2005
    Messages:
    842
    Likes Received:
    36
    Location:
    Boston
    Edit...be right back...


    I typed something else then realized it wasn't what I or you wanted. Here is another tool that may help you...

    http://www.htaccesstools.com/ But I don't think it will.. :( Sorry.
     
  3. John

    John Regular Member

    Joined:
    May 23, 2009
    Messages:
    757
    Likes Received:
    87
    Location:
    Tennessee
    Okay. Do not know why it stands edit but I guess you will help me with this and if that is the case thank you very much :)
     
  4. John

    John Regular Member

    Joined:
    May 23, 2009
    Messages:
    757
    Likes Received:
    87
    Location:
    Tennessee
    Ok :( Thanks anyway. Maybe someone else is good at this and can help me with this?
     
  5. Bundy

    Bundy Admin Talk Staff

    Joined:
    Apr 19, 2005
    Messages:
    842
    Likes Received:
    36
    Location:
    Boston
    This might help you but you may need to be logged in or be part of vbseo?

    vBulletin SEO Forums

    You are looking for rewrites right?
     
  6. John

    John Regular Member

    Joined:
    May 23, 2009
    Messages:
    757
    Likes Received:
    87
    Location:
    Tennessee
    Yes I am looking for rewrites but this is not for any vbulletin forum or anything like that its for an website only.
     
  7. Bundy

    Bundy Admin Talk Staff

    Joined:
    Apr 19, 2005
    Messages:
    842
    Likes Received:
    36
    Location:
    Boston
    That should still help you then.
     
  8. John

    John Regular Member

    Joined:
    May 23, 2009
    Messages:
    757
    Likes Received:
    87
    Location:
    Tennessee
    Thanks for that one but it doesn't work. just get an 500 error page when i put the rewrite rule in my .htaccess file.
     
  9. Nick

    Nick Regular Member

    Joined:
    Jul 27, 2008
    Messages:
    7,441
    Likes Received:
    218
    What exactly did you put in your .htaccess? Can you paste the code here? Thanks. ;)
     
  10. John

    John Regular Member

    Joined:
    May 23, 2009
    Messages:
    757
    Likes Received:
    87
    Location:
    Tennessee
    This is what I put in the .htaccess file.

    RewriteEngine on

    RewriteRule 'home\.php=(.*?)$' => 'x/'
     
  11. John

    John Regular Member

    Joined:
    May 23, 2009
    Messages:
    757
    Likes Received:
    87
    Location:
    Tennessee
    Anyone that can help me with this?
     
  12. brad@codeworks

    brad@codeworks Newcomer

    Joined:
    Oct 8, 2009
    Messages:
    1
    Likes Received:
    0
    RewriteRule ^x(/?)$ home.php [NC,L]

    The (/?) says it can have a / but doesnt have to. NC is no case
     

Share This Page