Need help with .htaccess

Connect with other users about what to run on your webhosting (and how to run it) here.
Post Reply
IcEWoLF
This is my homepage
This is my homepage
Posts: 1192
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Thu Aug 10, 2006 9:41 pm
Contact:

Need help with .htaccess

Post by IcEWoLF »

Hi John, I want my website to include the www. in front when i visit the website.
I mean I could still use www.47r-squad.com to go to my website but I want 47r-squad.com when someone uses that link to automatically work as www.47r-squad.com because I am having issues somehow with the website and plugins to load.
basically when I use 47r-squad.com I want the www to be added when I visit the site.
Image
Image
User avatar
Edge100x
Founder
Founder
Posts: 13113
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Need help with .htaccess

Post by Edge100x »

You could do this in a .htaccess file, but I'd recommend using a Forward in our system as an easier solution.

Just go to your "Domains" page and change the "Type" for the @ subdomain of 47r-squad.com to "Forward", then enter http://www.47r-squad.com into the "Where it points" field. Make sure that the www subdomain is set up as a "Folder" type for this to work.
IcEWoLF
This is my homepage
This is my homepage
Posts: 1192
Joined: Thu Aug 10, 2006 9:41 pm
Contact:

Re: Need help with .htaccess

Post by IcEWoLF »

Oh, that was a quick reply!
Great, thank you John.
Image
Image
IcEWoLF
This is my homepage
This is my homepage
Posts: 1192
Joined: Thu Aug 10, 2006 9:41 pm
Contact:

Re: Need help with .htaccess

Post by IcEWoLF »

the domain is pointing two different cookies.
When i go to 47r-squad.com and login there is no issues, but when I go to www.47r-squad.com and try to login its no use, it doesn't log me in.
They are not working :(. I tried the forward thing, but it doesn't seem like its working
Image
Image
User avatar
Edge100x
Founder
Founder
Posts: 13113
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Need help with .htaccess

Post by Edge100x »

Per your support request, I set the @ forward for you now as I described earlier in this thread, and it works for me, redirecting to http://www.fourty7r.com as expected. You should be all set now.
IcEWoLF
This is my homepage
This is my homepage
Posts: 1192
Joined: Thu Aug 10, 2006 9:41 pm
Contact:

Re: Need help with .htaccess

Post by IcEWoLF »

http://47r-squad.com/forums/login.php

Right now when I try to login it says:

Code: Select all

The requested URL /forums/login.php was not found on this server.
I double checked and all the files are there, but the link changes to //47r-squad.com
Image
Image
User avatar
Edge100x
Founder
Founder
Posts: 13113
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Need help with .htaccess

Post by Edge100x »

Ah, you're deep-linking with it. That does change things.

Try turning back off the "Forward" and creating an .htaccess file with these contents instead:

Code: Select all

RewriteEngine on
RewriteCond %{HTTP_HOST}    ^47r-squad.com$ [NC]
RewriteRule ^(.*)$          http://www.47r-squad.com/$1 [R=301,L]
IcEWoLF
This is my homepage
This is my homepage
Posts: 1192
Joined: Thu Aug 10, 2006 9:41 pm
Contact:

Re: Need help with .htaccess

Post by IcEWoLF »

John, I put the link in the public_html now its redirecting me to: http://www.47r-squad.com/public_html/
I turned off forward option I believe.

Also: when I open the website in IE I get:
No website is currently set up at this address.

If you just set this site up, there may be a slight delay of up to a minute while the new Apache configuration is loaded; try visiting the page again in a minute or two and clicking refresh in your browser.

Redirecting to our main rentals page in 5 seconds..
Image
Image
IcEWoLF
This is my homepage
This is my homepage
Posts: 1192
Joined: Thu Aug 10, 2006 9:41 pm
Contact:

Re: Need help with .htaccess

Post by IcEWoLF »

Ok, now I am able to access my website, only problem is, its not working properly.
I cannot log in. It just redirects me to the forums page and same thing happens.
Image
Image
User avatar
Edge100x
Founder
Founder
Posts: 13113
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Need help with .htaccess

Post by Edge100x »

It looks like you have your forums / CMS set to use 47r-squad.com as a base URL instead of http://www.47r-squad.com (if you hover your mouse over any of your menu links, you can see that they are all to 47r-squad.com). If its form submission also goes to 47r-squad.com, that explains the problem. This is likely something that you will need to fix in an admin configuration module.
IcEWoLF
This is my homepage
This is my homepage
Posts: 1192
Joined: Thu Aug 10, 2006 9:41 pm
Contact:

Re: Need help with .htaccess

Post by IcEWoLF »

Everything seems to work fine now :)
Thanks John for all the help, your great!
http://www.47r-squad.com/forums/index.php
Image
Image
Post Reply