JustinMs66@hotmail.com Posted August 22, 2009 Share Posted August 22, 2009 right now i am using http://ip.goes.here/~admin/ to view my website until i switch dns over this new server. http://ip.goes.here/~admin/ points to /home/admin/public_html/. I have an .htaccess in /home/admin/public_html/ saying: RewriteEngine On allow from all RewriteRule ^contact$ contact.php when i go to http://ip.goes.here/~admin/contact.php, it works, but when i go to http://ip.goes.here/~admin/contact, it says: 404: The requested URL /home/admin/public_html/contact.php was not found on this server.however, i checked it with SSH, and that file does exist. so .htaccess is looking in the wrong place. is this because of the extra directory /~admin/ in the url i have to use until i switch, is it screwing things up? Quote Link to comment https://forums.phpfreaks.com/topic/171426-solved-htaccess-finding-file/ Share on other sites More sharing options...
wildteen88 Posted August 22, 2009 Share Posted August 22, 2009 You need to set rewriteBase to /~Admin/ RewriteEngine On allow from all RewriteBase /~Admin/ RewriteRule ^contact$ contact.php Quote Link to comment https://forums.phpfreaks.com/topic/171426-solved-htaccess-finding-file/#findComment-904053 Share on other sites More sharing options...
JustinMs66@hotmail.com Posted August 22, 2009 Author Share Posted August 22, 2009 perfect, thanks! Quote Link to comment https://forums.phpfreaks.com/topic/171426-solved-htaccess-finding-file/#findComment-904061 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.