sbliss
asked on
mod_rewrite - simple I'm sure...
I need to rewrite the URL: www.something.com/gilmanciocia/opportunity/johndoe
to: www.something.com/gilmanciocia/opportunity/index.php?name=johndoe
My latest attempt doesn't work but I've never done this before and I'm half guessing:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^gilmanciocia/opportunity/ ([A-Za-z]+ )$ gilmanciocia/opportunity/i ndex.php?n ame=$1
</IfModule>
to: www.something.com/gilmanciocia/opportunity/index.php?name=johndoe
My latest attempt doesn't work but I've never done this before and I'm half guessing:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^gilmanciocia/opportunity/
</IfModule>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
L means last, rules below aren't checked anymore
R forces an external redirection with HTTP status code 302 (moves temp.), so the URl will change in the location bar
AllowOverride... so you're using it in a .htaccess file. Usually there is no leading slash in the pattern (left side) of the RewriteRule. hm...
R forces an external redirection with HTTP status code 302 (moves temp.), so the URl will change in the location bar
AllowOverride... so you're using it in a .htaccess file. Usually there is no leading slash in the pattern (left side) of the RewriteRule. hm...
ASKER
This is on my MacMini in my studio. I use it as a development server and I provide client access through a free IP service...if that somehow explains the leading slash.
The bottom line is it works... and thanks again.
Steve
The bottom line is it works... and thanks again.
Steve
ASKER
RewriteRule ^/gilmanciocia/opportunity
did the trick. What's the [L] and [R] for?
Thanks for your quick and accurate response.