Forum Moderators: phranque
RewriteEngine on
RewriteRule ^([A-za-z]+)$ /offers/$1/ [R]
RewriteRule ^([A-za-z]+)/ offers.php?types=$1
If a visitor goes to [my-url.com...] they get redirected to [my-url.com...] (adding the trailing slash) and this pulls information from [my-url.com...]
However, on my other website running Apache 1.3.33 (Unix) it works, but the visitor gets redirected to [my-url.com...] (the www. is missing).
Any idea why the difference and how I can get the "www." back? I guess I could hard code the whole URL including the "www." But there must be a simpler way!
Thanks in advance :)
RewriteEngine on
RewriteRule ^([a-z]+)$ http://www.example.com/offers/$1/ [NC,R=301,L]
RewriteRule ^([a-z]+)/ /offers.php?types=$1 [NC,L]
The [NC] flag makes the alphabetic character compare non-case-sensitive, and so eliminates some uneccessary CPU work.
Jim