Jump to content

create a dynamic url


xbl1

Recommended Posts

Hi;I want to create a dynamic URL by using mod_rewrite, to let user post their thread like this forum does.And i want to rewrite my all request as following:code:domain.com/form and Mod_Rewrite -> domain.com/index.php?topic=form and Mod_RewriteIn the .htaccess file, i wrote the rewite rule as following:RewriteEngine OnRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^(.+)?$ index.php?name1=$1 [L]But the problem for me is after a user type his topic for his new thread, how i get the value of the topic and put it into action, let the action="value of the topic". For example, if the value of the topic is "how to use mod_rewrite", then i want the action="how to use mod_rewrite".Could anybody give me some idea how to do that by php. Thanks <html><body><form name="input" action="????????" method="get"> <input type="text" name="topic" value="type your topic here" size="20"><br><textarea rows="10" cols="30"> Type your massage here </textarea><br><input type="submit" value="Submit"></form></body></html>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...