Just got done migrating from a different host to NFO. Everything ran smoothly, until I added my domain name, and the DNS server(s) pointing to the NFO ones.
I've got a pretty big forum with 10,200+ posts and this is crucial for me. So the old forum URL was originally http://www.velocity-server.com/forums/, where the forums reside. Didn't have a main site on the root of the server, as I just set it up to redirect to the forums. So this is where the issue comes to play.
Using NFO, the forum URL get's set to just plain http://www.velocity-server.com/index.php, which causes a ton of havoc on my end, as almost the whole forums are already configured to run on my old URL. Including pictures, attachments, custom work I did on it ect ect. I currently have the forums folder inside the 'public' folder.
Any clues as to how I might go about using the original forum URL? I've contacted support through the cpanel, yet nothing was resolved, as the suggestions given gave no results. I'd appreciate this a ton.
Thanks!
Forum URL issues
-
- New to forums
- Posts: 4
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Tue Oct 16, 2012 7:29 pm
-
- This is my homepage
- Posts: 353
- Joined: Fri Sep 17, 2004 7:50 pm
- Contact:
Re: Forum URL issues
Honestly, I can see the /forum right now, though going to your domain root there is no index.php
It more than likely means your DNS servers from your provider has yet to update to the NFO servers. This can take 24-48 hours. Apparently my local provider is quicker than this, it depends on your provider.
Another thing you can do, to enforce your PC points to the right DNS servers, is associate your domain name with the NFO IP addresses using the hosts file. If you have no clue what I'm talking about here, I do not advise looking into it, because fiddling with it if you don't know exactly what you are doing can break a LOT on your own PC.
It more than likely means your DNS servers from your provider has yet to update to the NFO servers. This can take 24-48 hours. Apparently my local provider is quicker than this, it depends on your provider.
Another thing you can do, to enforce your PC points to the right DNS servers, is associate your domain name with the NFO IP addresses using the hosts file. If you have no clue what I'm talking about here, I do not advise looking into it, because fiddling with it if you don't know exactly what you are doing can break a LOT on your own PC.
Re: Forum URL issues
http://www.velocity-server.com/forums/ is working for me right now to go to your forum. http://www.velocity-server.com/ goes to an indexed directory, which is not good from a security standpoint, so I recommend setting up a redirect so that anything requested as http://www.velocity-server.com/xxx but not matching http://www.velocity-server.com/forums/xxx causes the client to go to http://www.velocity-server.com/forums/xxx. Or, adjust your forums configuration to remove the "/forums" bit (it should be in its administration pages) and switch your subdomain to point to "public/forums" instead of "public".
Re: Forum URL issues
Yes, it seems I've gotten all of restored to previous settings, as it was with my previous host. The DNS server(s) are already resolved and pointing to NFO. Although as you can see, when visiting http://www.velocity-server.com, it goes to an indexed directory. So all I need to do is redirect that, to the forums folder. Which I'm having trouble doing.FlyingMongoose wrote:Honestly, I can see the /forum right now, though going to your domain root there is no index.php
It more than likely means your DNS servers from your provider has yet to update to the NFO servers. This can take 24-48 hours. Apparently my local provider is quicker than this, it depends on your provider.
Another thing you can do, to enforce your PC points to the right DNS servers, is associate your domain name with the NFO IP addresses using the hosts file. If you have no clue what I'm talking about here, I do not advise looking into it, because fiddling with it if you don't know exactly what you are doing can break a LOT on your own PC.
That's exactly what I want to do, redirect it to http://www.velocity-server.com/forums. Any clue as how I would go about setting up the redirect with mod_rewrite? As I don't have the slightest idea how...Edge100x wrote:http://www.velocity-server.com/forums/ is working for me right now to go to your forum. http://www.velocity-server.com/ goes to an indexed directory, which is not good from a security standpoint, so I recommend setting up a redirect so that anything requested as http://www.velocity-server.com/xxx but not matching http://www.velocity-server.com/forums/xxx causes the client to go to http://www.velocity-server.com/forums/xxx. Or, adjust your forums configuration to remove the "/forums" bit (it should be in its administration pages) and switch your subdomain to point to "public/forums" instead of "public".

Thanks!
-
- This is my homepage
- Posts: 353
- Joined: Fri Sep 17, 2004 7:50 pm
- Contact:
Re: Forum URL issues
mod_rewrite is actually a little different than what you want to do here. You make use of it in an .htaccess file however, it is most commonly used to literally rewrite URL's for what's returned to the user.
To use your example mod_rewrite .htaccess for your root directory would point to your /forums directory, this is NOT a redirect.
What it essentially means is this. If someone were to go to your web site, velocity-server.com they would not be pushed to http://www.velocity-server.com/forums they would instead SEE that forum as the root.
Then, your forum URL's would, instead of looking like this
Would look like this
mod_rewrite is a powerful tool and very useful to many users out there, but it can also break a lot of things. Make sure your forum system supports the use of mod_rewrite. You may also have to re-name and clear your forum's cookie cache system to match the now root domain set up.
To use your example mod_rewrite .htaccess for your root directory would point to your /forums directory, this is NOT a redirect.
What it essentially means is this. If someone were to go to your web site, velocity-server.com they would not be pushed to http://www.velocity-server.com/forums they would instead SEE that forum as the root.
Then, your forum URL's would, instead of looking like this
Code: Select all
http://velocity-server.com/forums/index.php?PHPSESSID=rcl14uucrde4lktsghspidki77;action=login
Code: Select all
http://velocity-server.com/index.php?PHPSESSID=rcl14uucrde4lktsghspidki77;action=login
Re: Forum URL issues
I wrote this while FlyingMongoose was replying, but it's still valid.
Try creating an .htaccess file in your "public" folder containing the following.
That should redirect everyone using http://www.velocity-server.com/xxx to http://www.velocity-server.com/forums/xxx, eliminating their ability to view your main folder and maintaining your /forums/ URL structure.
mod_rewrite can be used for all sorts of things, including making "forums" appear as the root of your site, as FlyingMongoose suggested. However, you shouldn't do that here, because you could reconfigure your forum to do the same thing by having it generate valid URLs that don't have "forums" in them -- eliminating the internal redirect step.
Try creating an .htaccess file in your "public" folder containing the following.
Code: Select all
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/forums [NC]
RewriteRule ^(.*)$ http://www.velocity-server.com/forums/$1 [R=301,L]
mod_rewrite can be used for all sorts of things, including making "forums" appear as the root of your site, as FlyingMongoose suggested. However, you shouldn't do that here, because you could reconfigure your forum to do the same thing by having it generate valid URLs that don't have "forums" in them -- eliminating the internal redirect step.
Re: Forum URL issues
@FlyingMongoose - Ah, I see. That's what I'm trying to avoid actually, as I want the main domain to be pushed to the /forums/ directory.
@Edge100x - That seems to have done the trick actually. www.velocity-server.com isn't going to the indexed directory anymore, and is redirecting to www.velocity-server.com/forums
Last thing I need help with. Every file that's not in a directory inside the /public/ folder, can no longer be viewed, as it redirects the to www.velocity-server.com/forums/example.png. There's nothing that can be done to exclude those files from being redirected is there?
I appreciate the help guys!
@Edge100x - That seems to have done the trick actually. www.velocity-server.com isn't going to the indexed directory anymore, and is redirecting to www.velocity-server.com/forums
Last thing I need help with. Every file that's not in a directory inside the /public/ folder, can no longer be viewed, as it redirects the to www.velocity-server.com/forums/example.png. There's nothing that can be done to exclude those files from being redirected is there?
I appreciate the help guys!
Re: Forum URL issues
Alb0, if you want to still be able to access the files at the root URL (or other folders than "forums"), then you'll need to go with a different solution.
For instance, change the .htaccess file to just redirect the root URL.
This does not prevent unauthorized users from downloading those files. If you want to do that, you you should put the files in a separate, password-protected folder.
For instance, change the .htaccess file to just redirect the root URL.
Code: Select all
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/?$ [NC]
RewriteRule ^ http://www.velocity-server.com/forums/ [R=301,L]
Re: Forum URL issues
That seems to have done the trick, thanks Edge! As far as users being able to download those separate files, I'm not too concerned about. As all I have in there are just images/demos and what not, which are linked throughout the forums to display.
Thanks for the quick solution!
Thanks for the quick solution!