Skip to main content
Help Center
The GoDaddy Community will undergo maintenance starting on Tuesday, August 3rd at 3pm PST / 6pm EST. Learn more
  • GoDaddy Community
  • VPS & Dedicated Servers
  • VPS & Dedicated Servers

    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 

    using rest style URLs

    I am using old-school URLs on my cPanel website like this:

    In this, one server-side file "viewer.htm" can render information about any item


    I would rather address my content like this: or or or or or ...etc.


    ...while having all that content be served by a single script, since I certainly don't want to create directories for every possible widget. Also leaving open the possibility for or other similar CRUD use cases.


    Where do I start with GoDaddy cPanel in order to get that to work? A REST server? I am assuming that once I have the right "server thingy" then I can write my server-side content in python, ruby or PHP, etc.


    1 REPLY 1
    Former Employee

    Without knowing all the details, you may be able to do this without changing your code too much (or perhaps even at all!) using something like mod_rewrite, if you're running on Linux and your server supports it. Just found a great example in this list of different mod_rewrite use cases that sounds pretty similar to what you're trying to do. In their case, they were trying to do this rewrite included below. Sounds like it's in the same ballpark. 


    Screen Shot 2016-04-03 at 7.37.47 AM.png