static URLs

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Okay I have been futzing with this for a bit, so a request other viewpoints.

Using a website database and you want to present with static URLs so a
call to:


With .htaccess:
RewriteRule    ^page/([\d]*)    frontend?id=$1 [L]

Ok, that takes care of static link in a webpage, but what if you want to
get a page as a result of some form query and still want the result to
appear as a static URL?  Say a page selector form a could go to a
intermediate parsing script like:

<form action=" ">
<select name="id">
<option value="25">Some page</option>

Where q2url.php is:

$id = $_GET['pageID'];
$redirect = " /$id";
header("Location: $redirect");

So the result will appear again as a static:

Or is there another way to do this with a rewrite rule. If so any

Take care,

Re: static URLs

Jonathan N. Little wrote:

Quoted text here. Click to load it

I can't think of a better way. The initial URL is created by the user-agent,
and this will always create ?id=NNN URLs. You may intercept the form
submission using JavaScript, construct the correct URL and use
window.location. But your q2url.php should still be in place to handle
non-JS user-agents.

BTW: make sure, your 'page selector' is not the only way to open a page, or
search engines will not find it.

Benjamin Niemann
Email: pink at odahoda dot de
WWW: /

Re: static URLs

Benjamin Niemann wrote:
Quoted text here. Click to load it

Yes very true, no this 'page selector ' is in *addition* to the standard
navigation. Just wanted both methods to product the same static URL result.

Take care,

Site Timeline