Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
mod_rewrite on 'Homepages'
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
- :
- mod_rewrite on 'Homepages'
mod_rewrite on 'Homepages'
15-12-2008 11:02 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I am familiar with using .htaccess in my webspace but am having a few probs with mod_rewrite.
Looking at past threads I am making the assumption that mod_rewrite is enabled on the web server?
If so, I am attempting to redirect my username.force9.co.uk address to a new URL.
Suggestions please.
Paul
Looking at past threads I am making the assumption that mod_rewrite is enabled on the web server?
If so, I am attempting to redirect my username.force9.co.uk address to a new URL.
Suggestions please.
Paul
Message 1 of 7
(1,684 Views)
6 REPLIES 6
Re: mod_rewrite on 'Homepages'
15-12-2008 1:16 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
mod_rewrite is enabled on the homepages servers, and seems to work fine when I play with it. I'm guessing you want something similar to this:
That's the simplest way to do it, but might not suit your specific needs. Does your domain also point to your homepages space? If so you'll need to have a "RewriteCond" to make sure it doesn't apply to your domain, otherwise you'll create an infinite redirection loop.
RewriteEngine On
RewriteRule .* http://www.your-site.com/
That's the simplest way to do it, but might not suit your specific needs. Does your domain also point to your homepages space? If so you'll need to have a "RewriteCond" to make sure it doesn't apply to your domain, otherwise you'll create an infinite redirection loop.
Message 2 of 7
(396 Views)
Re: mod_rewrite on 'Homepages'
15-12-2008 1:42 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Many thanks,
I have been fiddling round with the syntax of my statement trying to get it working
RewriteRule (.*) http://www.mysite.co.uk/$1 [R=301,L]
which is similar (and works fine elsewhere) - but not the same as yours!
RewriteRule .* http://www.your-site.com/
Seems to work fine though.
Paul
I have been fiddling round with the syntax of my statement trying to get it working
RewriteRule (.*) http://www.mysite.co.uk/$1 [R=301,L]
which is similar (and works fine elsewhere) - but not the same as yours!
RewriteRule .* http://www.your-site.com/
Seems to work fine though.
Paul
Message 3 of 7
(396 Views)
Re: mod_rewrite on 'Homepages'
15-12-2008 3:10 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Looking a little deeper now at the folders within HTDOCS where other domains point:
What is needed for the RewriteCond to enable continued access to these and all child folders under them?
I can configure to get access to the folders but not other pages and folders at the next level down.
What is needed for the RewriteCond to enable continued access to these and all child folders under them?
I can configure to get access to the folders but not other pages and folders at the next level down.
Message 4 of 7
(396 Views)
Re: mod_rewrite on 'Homepages'
16-12-2008 12:08 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
You'd want something like:
above the RewriteRule. This will skip the rule for the folder and anything below it.
RewriteCond %{REQUEST_URI} !^/<foldername>/.*
above the RewriteRule. This will skip the rule for the folder and anything below it.
Message 5 of 7
(396 Views)
Re: mod_rewrite on 'Homepages'
16-12-2008 3:58 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
That is what I had been trying with myself.
When I add the RewriteCond the browser hangs.
I just added one line with the folder name replacing <foldername> in your example.
Just to be clear my domain is pointing at that folder.
Without the RewriteCond the RewriteRule works fine and redirects as it should.
This is being applied on ftp.plus.com rather than homepages, I don't think that should be an issue?
EDIT : I have tried this on 'hompages' and the result is the same.
FURTHER EDIT: FF reports a redirect loop !
When I add the RewriteCond the browser hangs.
I just added one line with the folder name replacing <foldername> in your example.
Just to be clear my domain is pointing at that folder.
Without the RewriteCond the RewriteRule works fine and redirects as it should.
This is being applied on ftp.plus.com rather than homepages, I don't think that should be an issue?
EDIT : I have tried this on 'hompages' and the result is the same.
FURTHER EDIT: FF reports a redirect loop !
Message 6 of 7
(396 Views)
Re: mod_rewrite on 'Homepages'
17-12-2008 10:21 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
It sounds like you need another RewriteCond, to exclude your domain name. BTW ftp.plus.net and homepages.plus.net are effectively the same thing.
Something like:
Something like:
RewriteCond %{HTTP_HOST} !\.mydomain\.com$
Message 7 of 7
(396 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
- :
- mod_rewrite on 'Homepages'