php - HTML Post With Format "Blog" -


i working on personal website, http://dummycode.com , having 1 issue, or rather bothering time-consuming scenario. since new user cannot seem post more 2 links, rather posting full link posted path after website link. example: http://dummycode.com + /path/path

i start off trying explain how going work, have project directory, or archive, @ /projects , trying facilitate process of adding new project archive continue add, modify, , change these different projects , there statuses. if at, /projects/wordcounttool can see example of need project archive or information project like.

this being done creating new directory, adding index.html , editing project using template, /projects/projecttemplate.html

what trying create php/html form can fill out specific information project , automatically creates directory under /projects/projectname , fills in form information fill out.

i wondering how go process? know need make form , run specific php script creates directory, creates index.html file in directory, fills in specific variables in corresponding spots , finalize it.

essentially, question how go doing this? initial steps need take in order process started? looking research , since want learn , myself not going use cms yet. want learn more html , php , see if can conquer since experience 15 year old developer.

thanks can get, henry harris

you need set url rewriting. if you're using apache webserver, search mod_rewrite, if nginx, has it's own rewrite directives, etc.

with that, can set every request comes in website, gets handed php script specify , in script can decide need output based on url used.

for example (this apache), in simplest case, can set requested server gets passed same php script (index.php), except if existing file css file or image file. goes .htaccess file in web root (the main directory website files kept.):

<ifmodule mod_rewrite.c>     rewriteengine on     rewritebase /     rewritecond %{request_filename} !-f     rewritecond %{request_filename} !-d     rewriterule ^(.*)$ index.php?$1 </ifmodule> 

and in script can check $_server['request_uri'] variable contain url requested, example, if http://dummycode.com/blog/post/1/ requested, contain /blog/post/1/, , can @ parts of url , decide do.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -