Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
More domain directing woes
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- More domain directing woes
More domain directing woes
17-01-2010 10:39 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
OK, so I've got all four of my domains pointing at ccgi.<username>.free-online.co.uk, and the .htaccess works OK (BTW, if you have a index.php in the root, it runs that instead of looking at the .htaccess file!!!).
Now the problem is, that when I enter one of my domains into either IE or Firefox, the page comes up, but no graphics, no styles...just the PHP. If I were to click on one of the links to the graphics, I get an error 500. The sites work fine if I were to enter ccgi.<username>.free-online.co.uk/<folder>.
The .htaccess file only contains the redirection. Should there be other code in there (as I just uploaded my own, because I could not see if there were any originally there!!!)?
Now the problem is, that when I enter one of my domains into either IE or Firefox, the page comes up, but no graphics, no styles...just the PHP. If I were to click on one of the links to the graphics, I get an error 500. The sites work fine if I were to enter ccgi.<username>.free-online.co.uk/<folder>.
The .htaccess file only contains the redirection. Should there be other code in there (as I just uploaded my own, because I could not see if there were any originally there!!!)?
Message 1 of 6
(1,334 Views)
5 REPLIES 5
Re: More domain directing woes
17-01-2010 11:23 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
When you say "just the PHP" do you mean the actual PHP code is displayed rather than executed?
The problem with graphics and styles missing sounds like a paths problem, losing track of where these are when redirected. Are you using relative or full file-paths to those? If relative you could try giving the full (local) path. If that works possibly rewriting some of the environment variables is needed - but that's uncharted territory for me.
The problem with graphics and styles missing sounds like a paths problem, losing track of where these are when redirected. Are you using relative or full file-paths to those? If relative you could try giving the full (local) path. If that works possibly rewriting some of the environment variables is needed - but that's uncharted territory for me.
David
Message 2 of 6
(304 Views)
Re: More domain directing woes
17-01-2010 11:29 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
It would be interesting to see your htaccess file.
It sounds to be honest that the redirection within the htaccess is looping due to directory inheritance when it comes to the images, the the PHP output sounds rather odd and unexpected.
It sounds to be honest that the redirection within the htaccess is looping due to directory inheritance when it comes to the images, the the PHP output sounds rather odd and unexpected.
Message 3 of 6
(304 Views)
Re: More domain directing woes
18-01-2010 9:21 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
The PHP is running in that it is producing the expected HTML. It is even finding the graphics (otherwise wouldn't put a place holder for them - I've written a function to only produce a <img src...> if the graphic exists). Each page is finding the next, when linked (via an <a href...>). All references to all files are relative.
The .htaccess looks like:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.domain1.co.uk$ [nc]
RewriteRule (.*) /folder1/$1
RewriteCond %{HTTP_HOST} ^www.domain2.co.uk$ [nc]
RewriteRule (.*) /folder2/$1
RewriteCond %{HTTP_HOST} ^www.domain3.co.uk$ [nc]
RewriteRule (.*) /folder3/$1
RewriteCond %{HTTP_HOST} ^www.domain4.co.uk$ [nc]
RewriteRule (.*) /folder4/$1
I've even tried adding AddType image/gif .gif
Cheers,
Gerald.
The .htaccess looks like:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.domain1.co.uk$ [nc]
RewriteRule (.*) /folder1/$1
RewriteCond %{HTTP_HOST} ^www.domain2.co.uk$ [nc]
RewriteRule (.*) /folder2/$1
RewriteCond %{HTTP_HOST} ^www.domain3.co.uk$ [nc]
RewriteRule (.*) /folder3/$1
RewriteCond %{HTTP_HOST} ^www.domain4.co.uk$ [nc]
RewriteRule (.*) /folder4/$1
I've even tried adding AddType image/gif .gif
Cheers,
Gerald.
Message 4 of 6
(304 Views)
Re: More domain directing woes
18-01-2010 1:52 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Try:
That would be the standard way of rewriting to a subfolder. I'm not sure why <a href="http://community.plus.net/forum/index.php/topic,46224.msg392755.html#msg392755">this thread</a> suggested removing the second condition.
Boxersoft recently pointed out that this sort of rewrite has an unwanted interaction with the trailing slash problem. You can find a fix for that <a href="http://community.plus.net/forum/index.php/topic,82089.msg674617.html#msg674617">here</a>.
Gabe
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.domain1.co.uk$ [nc]
RewriteCond %{REQUEST_URI} !^/folder1/
RewriteRule (.*) /folder1/$1
RewriteCond %{HTTP_HOST} ^www.domain2.co.uk$ [nc]
RewriteCond %{REQUEST_URI} !^/folder2/
RewriteRule (.*) /folder2/$1
RewriteCond %{HTTP_HOST} ^www.domain3.co.uk$ [nc]
RewriteCond %{REQUEST_URI} !^/folder3/
RewriteRule (.*) /folder3/$1
RewriteCond %{HTTP_HOST} ^www.domain4.co.uk$ [nc]
RewriteCond %{REQUEST_URI} !^/folder4/
RewriteRule (.*) /folder4/$1
That would be the standard way of rewriting to a subfolder. I'm not sure why <a href="http://community.plus.net/forum/index.php/topic,46224.msg392755.html#msg392755">this thread</a> suggested removing the second condition.
Boxersoft recently pointed out that this sort of rewrite has an unwanted interaction with the trailing slash problem. You can find a fix for that <a href="http://community.plus.net/forum/index.php/topic,82089.msg674617.html#msg674617">here</a>.
Gabe
Message 5 of 6
(304 Views)
Re: More domain directing woes
18-01-2010 8:08 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Excellent - that works fine. Thanks.
I've even added the bit about the trailing slashes.
I've even added the bit about the trailing slashes.
Message 6 of 6
(304 Views)
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- More domain directing woes