Re: need a help in htaccess - please help



Thanks a lot. it was useful... finaly I find that using the RewriteRule
is better. here is sample code:

RewriteEngine On
RewriteRule getpicture/([^.]+).jpeg$ getpicture.php?foid=$1 [L]


Thanks
Mehdi

Mumia W. wrote:
On 08/13/2006 01:49 PM, persiancity wrote:
Hi there

I need a help to create a .htaccess file to:


convert such urls:
http://mydomain.com/getpicture/33.jpg


to


http://mydomain.com/getpicture.php?foid=33

[...]

Perhaps something like this would work (on one line):

RedirectMatch (.*)/getpicture/([^.]+).jpg
$1/getpicture.php?foid=$2.jpg

.



Relevant Pages

  • Need Help to prevent external linking
    ... I've researched the following to put in an .htaccess file on teh root of my ... RewriteRule .*\.jpeg$ - ... that is all I have in teh .htaccess file that sits at the root of my server, ... the warning image does not display - the file that was ...
    (comp.lang.php)
  • Re: PHP include and changing page names
    ... .htaccess file. ... Using the above RewriteRule I did a test. ... Or is it at the server configuration level (which I do not have ... You could try to use RedirectMatch in your .htaccess: ...
    (alt.html)
  • Rewrite Rules under linux (Specifically Centos 5): Newbie
    ... I have set up a set of re-write rules in my HTACCESS file so that ... I just want to catch every and any extension ... RewriteRule sitemap.xml /sitemaphandler.php ...
    (comp.os.linux.misc)
  • Re: PHP include and changing page names
    ... I do have the ability to edit the ... .htaccess file. ... Using the above RewriteRule I did a test. ... Or is it at the server configuration level (which I do not have ...
    (alt.html)
  • Re: PHP include and changing page names
    ... .htaccess file. ... Using the above RewriteRule I did a test. ... I left the .html error pages on the server but I got the server's default 404 page instead of mine. ... I get a 404 error but it isn't MY custom error page. ...
    (alt.html)