Mod_rewrite trouble: Want to direct from ?= to a flat link, nothing seems to work.

Posted by Davezatch on Stack Overflow See other posts from Stack Overflow or by Davezatch
Published on 2011-01-17T22:33:27Z Indexed on 2011/01/17 22:53 UTC
Read the original article Hit count: 144

Filed under:
|
|

I have a site that currently serves results as example.com/index.php?show=foo and I'd like it to read example.com/show/foo.

My understanding is this would make them visible to search engine robots, and it seems a much simpler way to do this than to create a couple hundred html files...

I've tried the following .htaccess code:

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^show/(.*)$ index.php?show=$1 [NC,L]

No dice.

Also tried this, which I found on another stack overflow question:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([0-9A-Za-z]+)/?$ /index.php?show=$1 [L]
</IfModule>

Any ideas on what I'm missing here?

© Stack Overflow or respective owner

Related posts about php

Related posts about .htaccess