Forum Moderators: phranque
Quote:
[f.mysite.com...]
I would like them to be able to acces their board through the following urls :
Quote:
[mysite.com...]
[mysite.com...]
[yourforumname.mysite.com...]
Could someone please give me the correct rewrite rules to achieve this?
I do not have root acces on the server and therefore can only use the .htacces
Thanks in advance for your help,
James
Welcome to WebmasterWorld!
We're not set up to write your code, but rather to help you get your code working. See our charter [webmasterworld.com] for more information and references.
This thread, on rewriting arbitrary subdomains to subdirectories [webmasterworld.com], contains some code you can modify to fit your third rewrite. Your first two rewrites are much simpler than that one.
Jim
In it, you will find lines like this:
mydomain.com. IN A 192.168.0.123
www.mydomain.com. IN A 192.168.0.123
Which you can change to read:
mydomain.com. IN A 192.168.0.123
www.mydomain.com. IN A 192.168.0.123
*.mydomain.com. IN A 192.168.0.123
The period following the domain name is required. You don't technically need the second line shown above in the new zone file, but leave it in, just in case you change your mind and want to remove the wild-card line after experimenting with it.
After making a change, it can take up to 48 hours before the new configuration is propagated to DNS servers world-wide.
Your server will also need to be set up to accept the wild-card subdomains. Again, ask your host.
Jim
I just worked out the following rule for redirecting ***.htm to /f/?forum=*** and it works fine :
RewriteRule ^(.*)?/index.htm(l)?$ http://www.example.com/f/?forum=$1 [L,NC,NS]
RewriteRule ^(.*)?\.htm(l)?$ http://www.example.com/f/?forum=$1 [L,NC,NS]
Any idea how I could make /***/ redirect to /f/?forum=***?
I would also like to redirect [mysite.com...] to [mysite.com...] (this whateever comes after the myforum eg variables like :&showforum=1)
If someone could point me into the right direction ...
Thanks in advance for your help,
James
[edited by: jdMorgan at 3:29 pm (utc) on Sep. 8, 2004]
[edit reason] Removed specifics per TOS [/edit]