bncplix Posted April 25, 2009 Share Posted April 25, 2009 Ok, so I have a catch-all subdomain setup. This points to /sub to be handled by the index php file there. In that file atm, all I currently do is print out "The subdomain you are currently using is:" then the subdomain, as a way to test. I also have a .htaccess in my root, that contains this: RewriteEngine on RewriteBase / Options -MultiViews RewriteRule ^([0-9a-zA-Z-]+)/?$ shortlink.php?short=$1 [L] This rewrites anything on the domain to the shortlink file to be handled. Such as www.mydomain.com/MyLink That works perfectly, but with that htaccess file, if i try to access a subdomain, it no longer prints out which subdomain i am on, instead it says: Not Found The requested URL /shortlink.php was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. I have been looking around everywhere on how to make a rewrite cond that will only run the rewrite rule if IT IS NOT on a subdomain, but i just cant find it anywhere! Can anybody give me a little help? Quote Link to comment https://forums.phpfreaks.com/topic/155657-htaccess-problem/ 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.