I'm just wondering how I could redirect my website to another part of my website. Like website.com to website.com/forum. Without ******ing up. I host on godaddy.
There might be an option to do so in your webhosting control panel. Check there, if not you will have to edit your .htaccess.
http://www.webweaver.nu/html-tips/web-redirection.shtml
Redirect using cpanel won't look nice and it is temporary in nature. You should look into the .htaccess really.
It is quite straightforward and simple (to me at least). My forum site is actually in sub sub folder of http://ahrasis.com/ahrasis/main/ or if by path /home/mycpanelusername/ahrasis/main. Because I want this to be on http://ahrasis.com whenever people open that URL, I created this .htaccess file and place it at the root of the path /home/mycpanelusername/.htaccess.
It is also due to the reason that I have several domain and want my root path to be clean and tidy.
Let me share my code:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?ahrasis.com$
RewriteCond %{REQUEST_URI} !^/ahrasis/main/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /ahrasis/main/$1
RewriteCond %{HTTP_HOST} ^(www.)?ahrasis.com$
RewriteRule ^(/)?$ ahrasis/main/ [L]
So now, my site that is actually at http://ahrasis.com/ahrasis/main/ will only be seen as http://ahrasis.com/ no matter what.
I also don't like www.ahrasis.com on my site. So, I created another .htaccess but this time I placed in /home/mycpanelusername/ahrasis/main/ instead. And this is the code:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
The second part of the code is not necessary and only if I want to use https or SSL in the future. But the whole point of this .htaccess code is to remove user from accessing via www. Good huh?! Well I don't know myself, but it helps me maintain my alexa rating somewhere somehow. My guess is, it is more worth it to be this way.
Quote from: ahrasis on September 15, 2010, 07:37:30 AM
Redirect using cpanel won't look nice and it is temporary in nature. You should look into the .htaccess really.
I highly beg to differ, its a easy way to just get it done and it works without a glitch. I've used it in the past and haven't had any problems, still don't actually. It implements the same code you have when you set it up through cPanel, so there is still no difference...
I think Cpanel is better since it's easier, no point getting complicated and editting .htaccess and such.
or move all the files, and run repair_settings.php (could someone link OP? i donw have the dropdown on my phone :P)
I am sorry if I have misdirected OP of any kind. I am also not sure how cpanel can help in permanent redirection without one have to go to different URL.
From website.com to website.com/forum. This is quite easy indeed. A simple index.php or index.html file can do that. That is to say if you want your url to always be http://website.com/forum. You can also just move the forum file and use repair settngs.php. For me that doesn't look nice at all.
And personally, IMHO we cannot redirect root domain to sub domain using redirect in cpanel. You can try this out and check. What happen if the redirect read http://website.com/forum and later redirect it to http://website.com/forum/forum and so on (with no ending)?
About cpanel and godaddy. I was using godaddy once. I can remember it has cpanel. May be it has something that can do redirect but it is using it's own control panel.
Just my 2 cents guys. And all the best to all.
index.html
<html>
<head>
<title>Redirection</title>
<meta http-equiv="refresh" content="0;url=http://website.com/forum" />
</head>
</html>
Simple & no editing of the .htaccess file. You can see it here : http://runedev.info : it's not much slower, as it has nothing to really load.
As I said, a simple index.php or index.html file can do that. It's all involve a little bit of lines of code isn't it? So why, is index.html or index.php can be better than .htaccess in any way? Just because it is simpler doesn't mean that it is better. It is basically the preference of each site owner and what they aim to achieve. So let it be whether they want index.html / index.php way, cpanel redirection way or .htaccess way. You always have options on how to do things.
Quote from: ahrasis on September 19, 2010, 08:33:03 AM
As I said, a simple index.php or index.html file can do that. It's all involve a little bit of lines of code isn't it? So why, is index.html or index.php can be better than .htaccess in any way? Just because it is simpler doesn't mean that it is better. It is basically the preference of each site owner and what they aim to achieve. So let it be whether they want index.html / index.php way, cpanel redirection way or .htaccess way. You always have options on how to do things.
I completely agree that editing the .htaccess file has nicer results, as I used to have it set like that myself, until my host ******ed at me for no reason, and basically forced me to have an index file, so I figured I'd just set a meta refresh. I just offered that because it's much easier if the OP doesn't know how to edit the .htaccess.
Quote from: IceXaos on September 19, 2010, 08:37:19 AM
I completely agree that editing the .htaccess file has nicer results, as I used to have it set like that myself, until my host ******ed at me for no reason, and basically forced me to have an index file, so I figured I'd just set a meta refresh. I just offered that because it's much easier if the OP doesn't know how to edit the .htaccess.
Why did your host do that for? I would avoid such hosting company if i were you. But wait until you finished your contract with them first. Then change for a better one.
Quote from: ahrasis on September 19, 2010, 08:41:40 AM
Quote from: IceXaos on September 19, 2010, 08:37:19 AM
I completely agree that editing the .htaccess file has nicer results, as I used to have it set like that myself, until my host ******ed at me for no reason, and basically forced me to have an index file, so I figured I'd just set a meta refresh. I just offered that because it's much easier if the OP doesn't know how to edit the .htaccess.
Why did your host do that for? I would avoid such hosting company if i were you. But wait until you finished your contract with them first. Then change for a better one.
I'm moving to a dedicated server on a different host once our year is up with them. I've had quite a few problems with them, the worst being their SQL. FatCow is def. not a good host for a community, and sayin' I use them is going to get me flamed. :( lol
My friend owns a highly populated movie site, and I got some good hosting advice from him, for when we leave FC.
Sadly for me, I am now testing a badly reviewed JustHost.com. People said they cannot be trusted and will cause you problems especially when you used more then 10% of their CPU resources. But I did note that most of them intend to manipulate "shared" hosting services rather then using them sensibly. They put all their video and music files on their "SHARED" hosting and allowed them to be watched or downloaded extensively (I don't even know whether that is even legal because each of such files have their own copyright).
I'd say thatit is their fault for misusing a "shared" hosting when they should not. But I really don't know and we'll see how. Some people have been using it for ages and got no problem with it. So it really depends on our usages really. If we are not going to use it "crazily" "shared" hosting like that, it should work just fine.
P/s: A little bit out of topic am I now. :D
My biggest annoyance is that there's a query limit of 75,000 an hour, and going over that will basically knock my forums offline for the remainder of that hour. When my site gets busy, it's the worst time to have downtime because of the nature of our site, and that's when it happens. I built my own chat which is flatfile so we could have it there for a little, and it did allow us to have chat for a bit, but even 40 users on at any time for an hour will go over the query limit, so that's outta the question for us. Before FatCow, I've never even heard of a query limit being used, so it's something I'm definitely not used to, and I hate it.
I guess I'll stop goin' off topic here. :P
And me too. I am have to stop this "redirection" as well. P/S: Btw, nice site of yours. ;D
Quote from: ahrasis on September 19, 2010, 09:05:48 AM
And me too. I am have to stop this "redirection" as well. P/S: Btw, nice site of yours. ;D
Thanks.
sageofmali, do you need any further help with this problem, a few ideas have been thrown out there for you to look into.
No, but I'm trying to install vbulletin. I'm keeping both. But, for some reason when I'm installing, I get this message: Fatal error: Memcache is not installed in [path]/includes/class_datastore.php on line 183. I have linux host on godaddy.
We do not support VBulletin here.
You will have to visit the vB support boards here:
vbulletin.com