agallo Posted July 21, 2009 Share Posted July 21, 2009 I have a rather odd issue that I don't know how else to troubleshoot. I have a domain xxx.com with 2 subdomains a.xxx.com and b.xxx.com. The 2 sub domains are just development areas for the domain xxx, so essentially they are the exact same. The purpose of this post was to find an alternative approach to troubleshooting my issue. The issue is that the domain and sub domains all use the following .htaccess file: RewriteEngine on RewriteRule ^~(.+)$ profile.php?n=$1 ErrorDocument 404 /error404.php If you go to a page that invokes the use of .htaccess file http://xxx.com/~profilename I get a generic 404 page not found comes up. However, the part that confuses me is that I should be getting a custom error page as if I went to http://xxx.com/somerandobs, but I don't?? Also, troubling me is that both sub domains are working perfectly. http://a.xxx.com/~profilename resolves to http://a.xxx.com/profile.php?n=profilename. I cannot think of anything outside of this domain that would cause this other than the .htaccess file. This was all working great on my legacy box before I swapped boxes. Thanks for the help in advance! Quote Link to comment https://forums.phpfreaks.com/topic/166781-htaccess-file-mod-rerwrite-rule-coming-up-with-404-page-not-found/ Share on other sites More sharing options...
dreamwest Posted July 21, 2009 Share Posted July 21, 2009 You dont need a root command in htaccess unless its a directory ErrorDocument 404 error404.php Or ErrorDocument 404 /errors/error404.php Quote Link to comment https://forums.phpfreaks.com/topic/166781-htaccess-file-mod-rerwrite-rule-coming-up-with-404-page-not-found/#findComment-879874 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.