I’ve installed WordPress here http://www.trsmithroofing.co.uk/flat_roof_blog and I’ve noticed that URL re-writes are working nicely.
Here’s an example of one.
http://trsmithroofing.co.uk/flat_roof_blog/index.php/2010/10/single-garage-flat-roof/
Knowing this works, I’m wondering why I cannot get re-writes to work on the same server… I have a simple rule which I can get working on my local host, but when I try it out ‘live’ it doesn’t work…
Here’s the rule I’ve got
Options +FollowSymLinks
RewriteEngine on
RewriteRule retest-choice-(.*)\.htm$ retest.php?choice=$1
On a localhost I can navigate to retest-choice-1.htm and it will correctly request retest.php?choice=1 It just won’t work on the fasthosts account.
I’ve been struggling with this for a long time, but now I know WordPress has managed to get it working, I’m asking if anyone can explain how so that I can use the same method. Thanks in advance, you guys on Stack overflow have yet to fail me.
Shane
This is not a rewrite. IT points you directly to index.php. The rest of directory-like structure is available to php in
$_SERVER['PATH_INFO']variable.