I am building a web app that puts out a link like the following:
http://www.sample.com/?a=bj7phm
I would like for it to look something like this:
Is this possible within the HTACCESS?
-B
I am building a web app that puts out a link like the following:
http://www.sample.com/?a=bj7phm
I would like for it to look something like this:
Is this possible within the HTACCESS?
-B
In order to do URL rewriting, you first need to:
mod_rewrite enabled on your server..htaccess file.AllowOverride must be set to All or include FileInfo)Then create the following .htaccess file in your web root:
RewriteEngine On
RewriteRule ^([\-_0-9A-Za-z]+)$ index.php?a=$1 [L]
You can customize RewriteRule as much as you want.
The first parameter is the regular expression to match the REQUEST_URI with (relative to the folder the .htaccess is in).
The second parameter is what you want to rewrite it to, $n being your match groups.