I have a website where dynamic URLs are rewritten to more friendly ones like:
mysite.com/index.php?q=foo becomes mysite.com/foo.
The rewrite is as follows: RewriteRule ^(.*)$ /?q=$1 [L] It works perfectly well, i.e., the mysite.com/foo retrieves the the database entry "foo" (a dictionary entry).
But the "foo" page contains some hyperlinks to other entries, say to "widget," and when the page is retrieved, the link to widget becomes:
mysite.com/foo?q=widget
Is there a way to eliminate this self referencing (foo?q=) and have only the widget (mysite.com/widget) when the widget link on the foo page is clicked?
Thank you in advance.