Could someone point me in the right direction? I'm trying to create a url like the one below. I don't want to use url hashes #I2QT40oSwU0AoH7g02cAHI
or parameters ?myparam=I2QT40oSwU0AoH7g02cAHI
.
https://www.dropbox.com/l/I2QT40oSwU0AoH7g02cAHI
Is this done with mod_rewrite?
Many thanks!
Yes, it's done by editing the httpd.conf file (turn on AllowOverride all) and creating a .htaccess file in your root web directory.
Here is a sample .htaccess file
Options -Multiviews
RewriteEngine On
RewriteBase /
RewriteRule ^l/(.*)$ /somescript.php?key=$1 [L]
The above will direct
https://www.dropbox.com/l/I2QT40oSwU0AoH7g02cAHI
to
https://www.dropbox.com/somescript.php?key=I2QT40oSwU0AoH7g02cAHI
It's called Clean URL Usually it's implemented via url rewrite technique. But also you can use 404 HTTP error page to handle such urls.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With