HTACCESS rewrite help
#1
How can you rewrite any url like so?

http://example.com/fooey >> http://example.com/define.php?w=fooey

EDIT: So that when some one goes to the first link they are sent to the second.
-Paul H.

Cogisne lingua latina?
Reply
#2
Add this to your .htaccess file:
RewriteEngine On
RewriteRule ^([^/]*)$ /define.php?w=$1 [L]

So http://example.com/define.php?w=fooey will be accesible from http://example.com/fooey

I don't know if the url can be forced to cahnge (like forcing http://example.com/fooey when accessing http://example.com/define.php?w=fooey).

http://www.generateit.net/mod-rewrite/
Reply
#3
Thanks!
-Paul H.

Cogisne lingua latina?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)