Jump to content

4ldesigns

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by 4ldesigns

  1. I must say I cannot really follow what you have setup, but If you have to do a redirect for a whole site / domain, I'm pretty sure you cannot do it _after_ all PW-instructions in the htaccess. Instead you need to put it at first and the PW-stuff after it.

    BTW: to say "This does not work" is less helpfull for people you want try to help. For example: a detailed description of what you get when requesting a URL that should redirected would be much better.

    I apologise horst. I'll try to explain this better, using real examples:

    www.streetboarding.org - (Main Website) - This is the ProcessWire site, located in the public_html directory.

    >>> www.streetboards.com.au - (Add-On domain) - This is my second website, located in the public_html/site-streetboards.com.au directory.

    Both of those are accessible by their respective URL's. That's cool. No more 403 Errors.

    I hope I've explained it a bit better now?

    Any help is greatly appreciated. Happy to attach the .htaccess files if that assists?

    If I understand the problem correcty, the easiest solution is to

    organize your folder a little bit different. I would suggest that you

    keep each site in its own subfolder, so your public_html folder contains

    only some folders, but no .htaccess or similar. This way you avoid that

    your public_html/.htaccess rules are inherited by your other

    domains/sites. Use these subfolder as your document root in cPanel.

     
    public_html/example.com/  
    public_html/secondwebsite.com/

    I suppose your method would make it much more organised.

    One question though - Would I need to set-up a 301 Redirect on my root public_html to the index.html file in the subfolder for my main site? If so, then my above problem is still relevent... as I would be left with the problem of www.example.com/example.com still showing...?

    I use CPanel with several servers and I have never had this problem.

    I normally have a site in the public_html folder and then one or more

    add-on sites in public_html/mysite.com/ folders. Some of these are true

    add-ons and others are sub-domains.

    I must admit, I never have any redirects though.

    Hi Joss, have you tried with your add-on sites browsing to those subfolders from your main sites URL? I mean, if you haven't set-up redirects then what's to stop people (and search engines) navigating to them?

  2. Now I have run into a bit of a problem.

    Both websites are working and accessible, however I want to clean things up for aesthetics and also for Search-Engine reasons... I want the websites to appear totally independent of each other.

    I set up a 301 Redirect in my cPanel so that www.secondwebsite.example.com redirects to www.secondwebsite.com - This works perfectly.

    - the code for this is added to the .htaccess file in public_html/site-secondwebsite.com

    I also set up a 301 Redirect in cPanel so that www.example.com/site-secondwebsite.com redirects to www.secondwebsite.com - This does NOT work :(

    - the code for this is added to the bottom of the ProcessWire .htaccess in public_html/

    Does anyone have a solution? Once I fix this last issue, I'm good to go!

    Any help would be much appreciated.

    Thanks.

  3. OK, I **think** I have found a solution / work-around for my issue.

    I found it when searching the ProcessWire forums, I stumbled across this post: http://processwire.com/talk/topic/1295-problems-setting-up-multisite/?p=11542

    Ryan mentions that the .htaccess blocks access to any directory that doesn't begin with 'site-' for security purposes.

    So, I simply deleted my add-on domain and re-added it with 'site-' at the start of its folder name.

    e.g. public_html/site-secondwebsite.com

    I can now leave my default .htaccess created by ProcessWire in the public_html directory, and now access a basic Hello World .html file in my add-on domains directory from the add-on domains URL: www.secondwebsite.com - YAY!

    I'm yet to test it out further, but for now it seems to have fixed my basic issue of the 403 Forbidden Error.

    I'll post back soon if I encounter any more problems.

    Cheers.

  4. G'day everyone :)

    I'm new to ProcessWire - hoping someone could help me out??

    I've installed ProcessWire in my root (public_html) directory & all is good - I really like this CMS. Very happy I stumbled across it! Thank you!

    This processwire site is accessible from my main domain (www.example.com) - No problem.

    However... I also own another domain name which I want to use for an entirely seperate website, but hosted on the same server account.

    Now, I've done this before with basic web pages with no hassles. But, with ProcessWire already installed - I'm having issues?

    In my cPanel admin area I create an Add-On Domain (www.secondwebsite.com).

    This creates a new folder in the root e.g. public_html/secondwebsite.com, and also creates the subdomain secondwebsite.example.com (which I'll deal with later).

    So, I place a Hello World index.html file within the new public_html/secondwebsite.com folder - This is to be the front page of my second website (entirely seperate from the ProcessWire site).

    When I type www.secondwebsite.com in my web browser, it is supposed to load that index.html file...

    Instead, I am greeted with a 403 Forbidden Error:

    Forbidden

    You don't have permission to access /
    on this server.

    Additionally, a 404 Not Found
    error was encountered while trying to use an ErrorDocument to handle the request.

    Apache Server at www.secondwebsite.com Port 80

    Spewing.

    I did a bit of Googling to try and find a solution and found this thread which seems to have the answer, but I just can't figure out how to apply it to ProcessWire?

    I applied the fix they suggest in that thread by adding:

    RewriteCond %{HTTP_HOST} ^(www\.)?secondwebsite\.com
    RewriteRule .* - [L]

    To the start of the .htaccess file in my public_html folder. No luck.

    I tried placing it in different areas of the file, such as after the ReWriteEngine on line... Still no luck.

    Now, I've verified that it is the ProcessWire .htaccess file which is causing the issue, as I renamed the file, and I was instantly able to access my Add-On Domain from www.secondwebsite.com

    Could someone PLEASE help me out with this issue? I really don't have much experience with .htaccess files.

    If I can't resolve this it messes up my website plans for using ProcessWire :(

    Any help is greatly appreciated, thanks.

    Nick

×
×
  • Create New...