Msg#: 4100805 posted 9:55 pm on Mar 20, 2010 (gmt 0)
> so please tell me that it is possible to redirect URL from a text which is not present in the URLs. See Example.
Sorry, no, it is not possible, unless you want to write a separate rule for each "pageid" value. If you have hundreds of pageid values, this would result in a large .htaccess or config file, and likely in a *very* slow site.
The usual solution is to rewrite *all* pageid URLs to a script, which can then open your database, look up the new URL by using the client-requested pageid, and then generate a 301-moved permanently redirect to the new "SEO friendly" URL. Therefore, only one rule is required in your .htaccess/config file, and all of the "heavy work" is done by your script, which has access to the information needed to associate pageid with the string that you want in the new URL.
Msg#: 4100805 posted 1:42 pm on Mar 21, 2010 (gmt 0)
Your PHP code must be written to return both the proper server status code and the proper header text. The code has been posted in our PHP forum several times, and it is not at all complicated -- Only one or two lines of PHP code are needed to return a proper 301-Moved Permanently or 302-Found redirect, 404-Not Found, or 410-Gone response.