hi,
i would like to send my users clicking on
www.mysite.com/page_1243423423.php to
www.mysite.com/profile-name.php
is it possible to do this with htaccess ?
if so what should i write into the file?
thanks
| SitePoint Sponsor |

hi,
i would like to send my users clicking on
www.mysite.com/page_1243423423.php to
www.mysite.com/profile-name.php
is it possible to do this with htaccess ?
if so what should i write into the file?
thanks




You need to give more information.
A very simple .htaccess redirect is simply:
But I'm assuming you want something more in depth than that?Code:Redirect http://www.mysite.com/page_1243423423.php http://www.mysite.com/profile-name.php
Honda Civic Forum - UK Civic Forum
Web Host Reviews - Independent, honest host reviews
My Portfolio - Simplicity is the ultimate sophistication





It means if you place that code in your ".htaccess" file in your site's root, it will redirect all traffic (including search engines) from the first URL to the second)
But I need more information from you on exactly what you want to achieve.
Honda Civic Forum - UK Civic Forum
Web Host Reviews - Independent, honest host reviews
My Portfolio - Simplicity is the ultimate sophistication

i would like this:
www.mysite.com/page_1243423423.php to
www.mysite.com/profile-name.php
and in google only to show: www.mysite.com/profile-name.php
thanks

acqua,
I'm not sure whether mod_alias (the Redirect module) will keep the REAL URL hidden because it requires an absolute URL for the redirection.
mod_rewrite will, however, so your request is for:I think what Alec was alluding to was that such a simple redirect is NOT the norm so, if you were looking for other redirects to be handled with this code, it will not happen because there is no way to map profile-name to page_1243423423.Code:RewriteEngine on RewriteRule ^/?profile-name\.php$ page_1243423423.php [L]
Regards,
DK
David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
Client and (unpaid) WHB Ambassador
Updated mod_rewrite Tutorial Article (setup, config, test & write
mod_rewrite regex w/sample code) and Code Generator
Bookmarks