Forum Moderators: phranque
I'm just starting with mod_rewrite and am trying to do a simple rewriting using a small .htaccess:
RewriteEngine on
RewriteRule ^artists/(.*)$ [MY.DOMAIN.HERE...] [L,R]
That is I want to give all [MY.DOMAIN.HERE...] - requests the output of [MY.DOMAIN.HERE...]
But everithing I get is a 404 - File does not exist: /path/to/server/artists/SomeArtistsName
The .htaccess lives in the /artists - directory.
The .htaccess IS interpreted, as I first used UTF-8 with BOM, which led to another error...
Anyone has an advice for me? I thought this should be a very basic and simple task, but I'm not getting a useful result.
Best regards and thank you in advance,
Roman.
[edited by: Augenfeind at 11:44 am (utc) on June 19, 2009]
This requires the clients to make a second HTTP request, and exposes your script path to the clients, and so negates any benefit of linking to and using your "friendly" URLs.
You would likely be happier using an internal rewrite instead of a redirect:
RewriteEngine on
RewriteRule ^artists/(.*)$ /artists.php?artist=$1 [L]