Link to home
Start Free TrialLog in
Avatar of paulp75
paulp75Flag for Australia

asked on

Mod rewrite

I'm trying to rewrite /newsletter/30/1.html so that it shows the page of /newsletter/30/1
/newsletter/30/2.html so that it shows the page of /newsletter/30/2
I tried this but had no luck.

RewriteEngine On
RewriteRule ^newsletter/([^/]*)/([^/]*)\.html$ /newsletter/$1/$2 [L]
Avatar of thetmanvn
thetmanvn
Flag of Viet Nam image

RewriteEngine On
RewriteRule ^(.*newsletter/)(.*)\.html$ $1$2/newsletter/$2\.html [L]

After this rule ....../newsletter/30/1.html will be rewritten to ...../newsletter/30/1/newsletter/30/1.html

Is that your expected
Avatar of paulp75

ASKER


the old script used to show it as /newsletter/30/1.html
but in the new script it shows as /newsletter/30/1
without the html

so i would like people who go to /newsletter/30/1.html to see /newsletter/30/1 instead
so that there are no 404 errors etc.
ASKER CERTIFIED SOLUTION
Avatar of thetmanvn
thetmanvn
Flag of Viet Nam image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of paulp75

ASKER

sorry i worked out that it was a routing issue with zend framework. thanks for your help though