URL Redirect

Well, I hate speaking too soon, I found a thread here on Xenforo.com with someone with some type of .htaccess issue http://xenforo.com/community/threads/modified-htaccess-now-nothing-works.64450/ and just for the heck of not being able to find an answer HERE or every other site on the net I have solicited , I may have by happenstance found the answer - I hope, and I would like to think anyone else with this issue would not have to go countless hours (and days) trying to find the answer as I did…

I just changed this:
Code:
RewriteRule ^.*$ /community/ [R=301,L]

To this:

Code:
RewriteRule ^$ /community/ [R=301,L]
 
You still haven't sorted out your www/non-www issue. Type in your address with www and it goes to www.yoursite.com/community/ Type it in as yoursite.com and it goes to yoursite.com/community/ You need to set this so that whatever you type, it goes to just one of these.
 
You still haven't sorted out your www/non-www issue. Type in your address with www and it goes to www.yoursite.com/community/ Type it in as yoursite.com and it goes to yoursite.com/community/ You need to set this so that whatever you type, it goes to just one of these.

I am getting this no matter what I type, not sure if your just referencing the /community and if that is really an issue.

sphynxlair.com/community/

Have you cleared your cache sine the last visit to my site?
 
This isn't a caching issue.

www.sphynxlair.com/community keeps the www in the URL. If you click then click on any links (Gallery, Forums etc) they all have www in the URL.

No matter what URL you type in, you should go to the non-www version of that URL if that's the option you've gone for with the root URL.
 
This isn't a caching issue.

www.sphynxlair.com/community keeps the www in the URL. If you click then click on any links (Gallery, Forums etc) they all have www in the URL.

No matter what URL you type in, you should go to the non-www version of that URL if that's the option you've gone for with the root URL.
Oh yes, I see now...back to the drawing board on this one. @Martok - next time you find an error - please wait until the following day to notify me...:p Well - good news! I have a robots.txt now!
 
Do you have cPanel, Plesk or something similar with your hosting? If so, there will be options in there for www/non-www redirecting that won't require you to do this in your .htaccess file.
 
Then i get this when following those instructions:

Screen Shot 2014-01-12 at 1.36.11 PM.webp

@Martok - i truly appreciate your help. perhaps there is a site that can better help me dealing more with .htaccess issues? I truly find it frustrating and hard to believe no one on this site can figure such a problem out..I cant even find someone to pay on here to fix it.
 
Sorry - it didn't work. Why would Xenforo have an .htaccess file in the community folder, would that not effect the .htacces in the root or interfere with commands?

community/.htaccess

Code:
#    Mod_security can interfere with uploading of content such as attachments. If you
#    cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
#    SecFilterEngine Off
#    SecFilterScanPOST Off
#</IfModule>

ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 default

<IfModule mod_rewrite.c>
    RewriteEngine On

    #    If you are having problems with the rewrite rules, remove the "#" from the
    #    line that begins "RewriteBase" below. You will also have to change the path
    #    of the rewrite to reflect the path to your XenForo installation.
    #RewriteBase /xenforo

    #    This line may be needed to enable WebDAV editing with PHP as a CGI.
    #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
</IfModule>
 
It appears that what ever Xenforo is using as a redirect being their forum is also in the community folder would be what I need, please help out Xenforo...
 
From what I've seen, your .htaccess file could do with being rewritten.

Getting www/non-www varies from server to server.
What is used on this site didn't work for me so I had to change the rewrite code.
You will have to keep trying until you find one which works.

My advice is to take a backup of what you have now.
Revert to the default .htaccess.
Then start adding in the custom code, one bit at a time, testing everthing each time you make a change.
Starting with the www/non-www code.
 
From what I've seen, your .htaccess file could do with being rewritten.

Getting www/non-www varies from server to server.
What is used on this site didn't work for me so I had to change the rewrite code.
You will have to keep trying until you find one which works.

My advice is to take a backup of what you have now.
Revert to the default .htaccess.
Then start adding in the custom code, one bit at a time, testing everthing each time you make a change.
Starting with the www/non-www code.
When you say revert to the default .htaccess - you mean the default .htaccess in the community folder and build off of that or start from scratch with the one in the root that has been there for years i am currently tinkering with.
 
Why do you have two .htaccess files?
Does your site have a landing page?
Which one are you trying to work with/fix?
 
Back
Top Bottom