I need help!
I want to redirect http://mysite.com/whatever to http://mysite.com/script.php?p=whatever but ONLY if http://mysite.com/whatever doesn't exist. I'd also (if possible) like to make sure that no trailing "/" is included, in other words http://mysite.com/frrp/ should redirect to http://mysite.com/script.php?p=frrp
I know that mod_rewrite can do (at least most of) this stuff, but that's as far as my knowledge on the subject goes. I have no idea how to write the rule I need to do this.
Secondly, I'd like to remove the www. prefix from addresses if a visitor includes it, and redirect http://www.mysite.com to http://mysite.com, regardless of the rest of the path. This is less important, but since I'm asking about mod_rewrite this seemed like a good time to ask!
Thanks in advance for your help!
I want to redirect http://mysite.com/whatever to http://mysite.com/script.php?p=whatever but ONLY if http://mysite.com/whatever doesn't exist. I'd also (if possible) like to make sure that no trailing "/" is included, in other words http://mysite.com/frrp/ should redirect to http://mysite.com/script.php?p=frrp
I know that mod_rewrite can do (at least most of) this stuff, but that's as far as my knowledge on the subject goes. I have no idea how to write the rule I need to do this.
Secondly, I'd like to remove the www. prefix from addresses if a visitor includes it, and redirect http://www.mysite.com to http://mysite.com, regardless of the rest of the path. This is less important, but since I'm asking about mod_rewrite this seemed like a good time to ask!
Thanks in advance for your help!