Hi, This is ankur from india i would like to hide my website url using htaccess method please give me a good suggestion which help me to hide url, my page url is: http://www.ecmrd.com?id=12&cat=base; i would like to hide this url. I am working under php & mysql environment Thanks
Try: http://corz.org/serv/tricks/htaccess2.php there's some great mod_rewrite examples there similar to what your requirements.
Hi, you can visit this site to learn about mod_rewrite. http://www.techiepark.com/tutorials/url-rewriting-for-php-web-applications-using-apache-mod_rewrite-extension/ Code (markup): There's some examples as well.
you can use mod rewrite with .htaccess example : for this >> http://www.ecmrd.com?id=12&cat=base; you can change it to >> http://www.ecmrd.com/get/base_12 using : RewriteEngine on RewriteRule ^get/(.*)_([0-9]+)$ blabla.php?cat=$1&id=$2
usee: RewriteEngine on RewriteRule ^get/(.*)_([0-9]+)$ scr.php?cat=$1&id=$2 RewriteRule ^w/([0-9]*)$ news.php?id=$1 [L] RewriteRule ^w/$ register.php [L] RewriteRule ^w/cw$ inc.php [L] RewriteRule ^/add$ add.php [L]
better is for .htacces this <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> and in index.php you can parse $_SERVER["REQUEST_URI"]