htaccess hidden redirect - Apache Send mail vote down 0 vote down 1 Views : 1528
Tagged in : Apache
htaccess hidden redirect:

To redirect a page using htaccess use "Redirect" keyword as:
Redirect /index.php http://hscripts.com/index.php

To hidden redirect the page, use:
RewriteEngine On
RewriteRule ^test.html index.html [L]

For hidden redirect in htaccess use the flag [L].
If you use [L], the page will be redirected but the url wont change ie, hidden redirect.
Redirect condition:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/test/(.*)/index.php
RewriteRule ^test/(.*)/index.php http://hscripts.com/test/test1.php?fname=$1 [L]

Important Note: Whenever you use "RewriteCond" & "RewriteRule", you must add the line,
RewriteEngine On


Rewrite rules will work only if the RewriteEngine is On.
By - Ramya, On - 2009-11-05




    Login to add Comments .