corillo181 Posted May 15, 2008 Share Posted May 15, 2008 RewriteRule ^mysite\.com/([a-zA-Z][[0-9]+)$ profile/profile.php?id=$1 Quote Link to comment https://forums.phpfreaks.com/topic/105847-why-is-this-rewrite-not-working/ Share on other sites More sharing options...
corillo181 Posted May 19, 2008 Author Share Posted May 19, 2008 any help at all? i just want to turn www.mysite.com/profile/profile?id=1 to www.mysite.com/1 Quote Link to comment https://forums.phpfreaks.com/topic/105847-why-is-this-rewrite-not-working/#findComment-544528 Share on other sites More sharing options...
corillo181 Posted May 19, 2008 Author Share Posted May 19, 2008 is there any other forum that will help me with htaccess? Quote Link to comment https://forums.phpfreaks.com/topic/105847-why-is-this-rewrite-not-working/#findComment-544663 Share on other sites More sharing options...
wildteen88 Posted May 19, 2008 Share Posted May 19, 2008 Use: RewriteRule ^mysite\.com/([0-9]+)$ profile/profile.php?id=$1 Quote Link to comment https://forums.phpfreaks.com/topic/105847-why-is-this-rewrite-not-working/#findComment-545223 Share on other sites More sharing options...
corillo181 Posted May 20, 2008 Author Share Posted May 20, 2008 i get this error Not Found The requested URL /1 was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Quote Link to comment https://forums.phpfreaks.com/topic/105847-why-is-this-rewrite-not-working/#findComment-546154 Share on other sites More sharing options...
wildteen88 Posted May 21, 2008 Share Posted May 21, 2008 Remove mysite\.com/ from the rewrite rule. You don't need to include your domain in the rewrite rule Quote Link to comment https://forums.phpfreaks.com/topic/105847-why-is-this-rewrite-not-working/#findComment-546685 Share on other sites More sharing options...
lazylester Posted May 27, 2008 Share Posted May 27, 2008 it looks to me as if mod_rewrite IS working. You said your intention is to rewrite the url to be mysite.com/1, well the server is telling you that it can't find a file with that name "1", so the mod_rewrite is working and the failure is afterwards when the server is looking for the file. Do you have a file with the name "1"? Quote Link to comment https://forums.phpfreaks.com/topic/105847-why-is-this-rewrite-not-working/#findComment-550550 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.