Jump to content

Recommended Posts

Hey guys, I trust you are well :)

 

I am currently sitting between a rock and a hard place, and I understand that I will not be able to get the entire project solved in this thread, but I was hoping someone can maybe shoot me in the right direction with this project.

 

I have been assigned to design a simple marketing website for a client. It is much like all other marketing sites out there, nothing tricky. The visitor to the site will be able to list their business on the website, and it must be a complete automative project. My problem is the following.

 

Generally, with a project like this you will have a single page (in this case client.php) and the content will be populated from the database and be displayed as www.web.com/client.php?client=123 (where client=123 is the id of the client in the database), but i have noticed a growing trend amongst websites where you can have e.g. www.web.com/clientname (this usually without an extension to the file, you can access that page and it will redirect you to the correct client page)

 

Can anyone tell me how I will go to do this? My client wants his clients to have unique urls to assure they get more out of the package.

 

Thank you in advance.

Link to comment
https://forums.phpfreaks.com/topic/176057-solved-dynamic-page-names/
Share on other sites

Fast and friendly, thank you sooo much!

 

Just a quick question (and I assume the answer is yes) - From a quick browse mod rewrite works through the htaccess. file, now I have never worked with it, can the file be edited dynamically? I mean when someone e.g registers on the website, can PHP alter the file and make a entry into the htaccess file so that it is not a manual process?

That would be counter intuitive. The objective is to have a single rewrite rule that will pass the information to a PHP file. That PHP file will then dynamically do all the work. So once the htaccess file is created it shouldn't need editing.

 

I wrote a fairly simplified tutorial on this sort of thing which you can view here, hopefully you'll find it usefull.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.