Portal Home > Knowledgebase > Articles Database > htaccess redirect with variable
htaccess redirect with variable
Posted by artofsound, 11-03-2010, 08:57 PM |
I'm trying to redirect the following for variable zzz
old link
domain.com/dir1/dir2/zzz/pagename.swf
to
domain.com/dir1/dir2/pagename.html?sfParam=zzz
Everything besides zzz is static text which doesn't change.
Any help on the correct entry in the htaccess file would be appreciated!
Thanks,
Ed
|
Posted by TheDandy, 11-06-2010, 11:35 AM |
Try this one on .htaccess:
|
Posted by artofsound, 11-07-2010, 05:05 PM |
Thanks for the suggestion. I'm not sure this will work as zzz changes every time. It could be 123, 124 up to 999, etc...so I don't want to type in each one.
|
Posted by TheDandy, 11-07-2010, 08:01 PM |
Right...
Try this one:
Is that correct?
It will "grab" teh values for dir1, dir3 and zzz and pass them to the new format.
|
Posted by artofsound, 11-07-2010, 08:26 PM |
That looks much better. I'll give it a try.
|
Posted by artofsound, 11-07-2010, 10:59 PM |
I did try it. I'm not sure of the swf (or something else) is possibly blocking the redirect, but the htaccess change had no effect whatsoever.
|
Add to Favourites Print this Article
Also Read