Jump to content

Recommended Posts

Hi there, i've recently been writing a pretty simple CMS.  It works quite well and all the admin stuff works ie add/delete/edit pages.  The bit that i'm struggling with the most is the front-end of the system.

The menu system currently pulls all the "pageid's" and "titles" from the 'pages' table in the database and then makes a link for each one in a simple un-ordered list.

The link for each one is a $_GET statement which points to

"index.php?pageid=??".

This works fine and the system runs okay however what i'm wondering:

Can I easily disguise the content of the address bar so that it simply reads the name of the page. 

That is, if the user clicks the menu link for the 'about us' page, rather than having the address bar read "index.php?pageid=2" or "index.php?page=aboutus"

I want it to read "exampledomain.com/aboutus" or "/aboutus.php".

The theory being that the user then has a link that is more memorable and they can navigate back to the desired page rather than having to remember the more complex index.php?pageid=??

 

I hope that this is clear enough?

Any suggestions?

Link to comment
https://forums.phpfreaks.com/topic/144639-solved-cms-address-bar-text/
Share on other sites

Thanks very much Premiso.

This looks like exactly what I need.

I've taken a look at some pages on .htaccess and have loaded mod_rewrite on my Apache server and had a play with some simple rewrites. 

I think I will wait till I've finished the rest of the CMS and got it working properly before getting into the .htaccess stuff as I don't want to confuse myself too much.

Thanks for such as speedy reply though.

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.