Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Linux, Apache, MySQL, PHP
  4. PHP Static Url Rewrite

PHP Static Url Rewrite

Scheduled Pinned Locked Moved Linux, Apache, MySQL, PHP
phphtmldatabasecomhelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Morgs Morgan
    wrote on last edited by
    #1

    Hi people, I'm fairly new to php and I would like to know how to rewrite a static url to a friendly url. E.g. Rewrite: - http://site.domain.com/**buy\_products.html** to - http://site.domain.com/**buy-products** or /index.html to /home I tried this and did not work:

    Options +FollowSymlinks
    RewriteEngine On
    RewriteBase /
    RewriteRule ^home index.html
    RewriteRule ^wine-range wine_range.html

    I will appreciate your help. I've googled and the examples I come across are mostly converting dynamic urls to static. Regards, Morgs

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups