301 working but not rewritting URL

Discussion in 'Apache' started by chriszz, Jan 23, 2007.

  1. #1
    Hi there,

    I'm trying to rewrite this page:

    /acatalog/dell_laptop.html

    To this page:

    /dell.html

    So when people type /dell.html it displays /acatalog/dell_laptop.html but the URL shows /dell.html :rolleyes: Phew

    I have tried the following code, which redirects the page but fails to rewrite the URL, so it displays the old one still. Here is the code:

    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^dell.html$ acatalog/dell_laptop.html [R=301,L]
    Code (markup):
    Help please! :D

    Thanks
     
    chriszz, Jan 23, 2007 IP