Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Well, there are some ways to do this.</p> <p>Widely adopted is using .htaccess, which you said don't wanna use. OK.</p> <p>You still have some options:</p> <ul> <li>Using a database table to map everything is one.</li> <li>Using a routine to check existing files.</li> <li>Using a extended xml sitemap.</li> <li>Using a caching system.</li> </ul> <p>Well, everything above can be mixed on your implemetation if you want.</p> <p>You can find a good article for this on a list apart.</p> <p><a href="http://www.alistapart.com/articles/succeed/" rel="nofollow">http://www.alistapart.com/articles/succeed/</a></p> <p>On this article the solution is a mix:</p> <p>first check if a file exists (for example "about-us.php"); if yes, include the file contents, else</p> <p>check db for this request (as a tip, you can have a field named "friendlyURL" on your main content tables). if exists, extract and display, else</p> <p>show a 404 page. as a tip for this one, keeping the SEO feature in mind, I would recommend you to have a sitemap xml. If page is not found, you can check sitemap if is not a broken URL, like:</p> <p><a href="http://yourdomain.net/shoes/male/bro" rel="nofollow">http://yourdomain.net/shoes/male/bro</a></p> <p>you can check if some URL like: <a href="http://yourdomain.net/shoes/male/brown" rel="nofollow">http://yourdomain.net/shoes/male/brown</a></p> <p>and suggest it to your customers/visitors. Along with:</p> <p><a href="http://yourdomain.net/shoes/male/" rel="nofollow">http://yourdomain.net/shoes/male/</a></p> <p><a href="http://yourdomain.net/shoes/" rel="nofollow">http://yourdomain.net/shoes/</a></p> <p>also a link for your HTML sitemap, and if you have a search feature on your site, also use it, display a link for user go to search page with that query.</p> <p><a href="http://yourdomain.net/search?q=shoes+male+bro" rel="nofollow">http://yourdomain.net/search?q=shoes+male+bro</a></p> <p>OR </p> <p>[input type="text" name="q" value="shoe+male+bro"];</p> <p>And another extra tech tip: make use of full-text search feature of your db if available.</p> <p>A interesting reading comes from Rasmus Lerdorf, PHP creator: <a href="http://lerdorf.com/lca04.pdf" rel="nofollow">http://lerdorf.com/lca04.pdf</a> (check page 34, about 404 redirects).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload