Htaccess help!

Discussion in 'Site & Server Administration' started by fri3ndly, Jun 22, 2011.

  1. #1
    Hi all

    I have a dynamic site and clean URLS are generated by an htaccess rule:

    
    	RewriteBase /
    	RewriteCond %{REQUEST_FILENAME} !-f
    	RewriteCond %{REQUEST_FILENAME} !-d
    	RewriteRule ^(.*)$ /index.php?slug=$1 [L]
    Code (markup):
    Although this does work and creates something like /about/ from /index.php?slug=about, unfortunately the source link of /index.php?slug=about can still be accessed directly meaning there is a potential duplicate content issue.

    Is there any rule I can create that makes sure this dynamic URL is redirected and cannot be accessed?
     
    fri3ndly, Jun 22, 2011 IP
  2. selvamurali

    selvamurali Peon

    Messages:
    69
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    first line shoule be need

    RewriteEngine On

    after that add another line. it will work
     
    selvamurali, Jul 21, 2011 IP