Source language: Translate to:

Create Virtual Directory...

Questions and information about creating Internet aware NeoBook applications. Including PHP, HTML, FTP, HTTP, Email, etc.

Moderator: Neosoft Support

Create Virtual Directory...

Postby David de Argentina » Tue Aug 27, 2013 10:26 am

Hi all,

I have a hosting under Linux with cPanel.
I have a php program that is called as:

http://www.mysite.com/myprogram.php?user=JohnDoe

Is possible transform this url to something like:

http://www.mysite.com/JohnDoe/

JohnDoe is a key to search an user into a Database, not a directory.

Any ideas ?

Thanks in advance,
David de Argentina
User avatar
David de Argentina
 
Posts: 1553
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: Create Virtual Directory...

Postby dec » Tue Aug 27, 2013 10:40 am

Hello,

Search on Google for something like "friendly urls htaccess php". I think can be useful here. ;)
.
Enhance your NeoBook applications!
.
57 plugins, 1113 actions and 230 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: Create Virtual Directory...

Postby David de Argentina » Tue Aug 27, 2013 10:59 am

Hi dec,

Excelent !

Thanks a bunch !
David de Argentina
User avatar
David de Argentina
 
Posts: 1553
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: Create Virtual Directory...

Postby dec » Tue Aug 27, 2013 12:09 pm

David de Argentina wrote:Hi dec,

Excelent !

Thanks a bunch !
David de Argentina


You're welcome! ;)
.
Enhance your NeoBook applications!
.
57 plugins, 1113 actions and 230 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: Create Virtual Directory...

Postby David de Argentina » Tue Aug 27, 2013 3:06 pm

Hi dec,

It works perfectly.

Take a look of this url:

http://www.neoregalos.com.ar/clientes/Garcia

PHP program and variables are hidden !

WOW !

Greetings from Buenos Aires,
David de Argentina
User avatar
David de Argentina
 
Posts: 1553
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: Create Virtual Directory...

Postby dec » Tue Aug 27, 2013 4:30 pm

Hello,

The "htaccess" way is used in WordPress and many other PHP CMS systems. This is good, but, in fact is possible to deal with more or less user friendly URL's without the use of any kind of "htaccess" files. For example, the approach I use in my HummPHP project do not use any "htaccess" file, but, as you can see, they have more or less friendly URL's like this:

http://www.hummphp.com/?contact

http://neoplugins.com/?plugin/nputil

http://neoplugins.com/?help/nputil

... and so on. As you can see this URL's are not exactly the sames (at the least use the "?" char) but more friendly's that, for example, this others:

http://neoplugins.com/?plugin=nputil

http://neoplugins.com/?help=nputil

http://neoplugins.com/?help=nputil&other=value

By the way probably you can use the "htaccess" files without problems. The question is if you use this kind of files need the Apache server, or any other server that can work directly or more or less adapted "htaccess" file. So if you do not use this files you do not depend (for this) on any particular server.
.
Enhance your NeoBook applications!
.
57 plugins, 1113 actions and 230 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain


Return to NeoBook and the Internet

Who is online

Users browsing this forum: No registered users and 1 guest