Page 1 of 1

url rewrite/custom 404

Posted: Fri Feb 09, 2007 1:15 pm
by neilmills34
Hello,
I have a problem which I hope someone can cast some light on for me.

I have built a site and CMS which loads a page by template/page content pulled from the database.

So for example:
index.php would load the homepage
index.php?u=2 would load the about us page
index.php?u=3 would load what we do page and so on....

Hence all pages are delivered from one index page.

The CMS actually creates HTML links such as aboutus.html?u=2 and solution.html?u=8

What I want to achieve for SEO purposes, is for this 'dummy' URL to be written in browser address bar, but the actual page being linked to is - index.php?u=2

I have got my ISP to create a custom php 404 page.

Can this URL rewrite be achieved with PHP or do I have to use apache mod_rewrite????

Do hope you can help.

Cheers,

Neil.

Posted: Fri Feb 09, 2007 2:34 pm
by RobertGonzalez
If you are talking about the browser address bar, you need mod_rewrite as the URL sent to the server would have to be a clean one. That means the ugly URLs left in the page controller output you are talking about will resolve, but will result in ugly URLs in the address on the next click.

Why can't you just make all the URL's pretty and use mod_rewrite to handle all page requests?