Hi,
I have the following simple rewriterule which isn't working. Anyone can point me in the right direction?
Thanks.PHP Code:RewriteEngine on
RewriteRule ^news$ news.php
| SitePoint Sponsor |
Hi,
I have the following simple rewriterule which isn't working. Anyone can point me in the right direction?
Thanks.PHP Code:RewriteEngine on
RewriteRule ^news$ news.php

Zaggs,
That code is okay provided you are on an Apache 2.x server and there is no other conflicting code.
Be sure to test, though, by adding flags to your code - I recommend [R=301,L] where the R=301 will tell the server to display the redirection and L tells Apache to go do it. If it works, then you can remove the R=301 (and the comma separator).
Regards,
DK
David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
Client and (unpaid) WHB Ambassador
Updated mod_rewrite Tutorial Article (setup, config, test & write
mod_rewrite regex w/sample code) and Code Generator
Bookmarks