Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
htaccess rewrite help
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
- :
- htaccess rewrite help
htaccess rewrite help
07-07-2010 2:34 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hi all
I'm very new to websites and apache, wordpress and PHP. I'm looking to setup Wordpress in my ccgi space and have it form part of my existing website which is located in the standard web space. I have a domain name registered with plusnet which points to the standard space and I'd also like that domain name to appear in the browser address bar when visitors to the website click on the blog section.
After a lot of digging on the net and in these forums it appears I need to use a redirect and then a rewrite within a .htaccess file to achieve the desired effect.
I've created a .htaccess file in the standard web space that redirects users who visit http://www.mydomain.co.uk/blog to http://ccgi.username.force9.co.uk to load up the wordpress index.php file - this is working. However I cannot get the rewrite to work, whatever I do http://ccgi.username.force9.co.uk shows in the browser address bar.
What rewrite code do I need to use and where should it be? Should it go in the .htaccess file in the standard webspace or in the ccgi space?
I've tried the following in the .htaccess file in the ccgi space with no joy...
Any help much appreciated!
I'm very new to websites and apache, wordpress and PHP. I'm looking to setup Wordpress in my ccgi space and have it form part of my existing website which is located in the standard web space. I have a domain name registered with plusnet which points to the standard space and I'd also like that domain name to appear in the browser address bar when visitors to the website click on the blog section.
After a lot of digging on the net and in these forums it appears I need to use a redirect and then a rewrite within a .htaccess file to achieve the desired effect.
I've created a .htaccess file in the standard web space that redirects users who visit http://www.mydomain.co.uk/blog to http://ccgi.username.force9.co.uk to load up the wordpress index.php file - this is working. However I cannot get the rewrite to work, whatever I do http://ccgi.username.force9.co.uk shows in the browser address bar.
What rewrite code do I need to use and where should it be? Should it go in the .htaccess file in the standard webspace or in the ccgi space?
I've tried the following in the .htaccess file in the ccgi space with no joy...
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.mydomain.co.uk$ [nc]
RewriteRule (.*)
Any help much appreciated!
Message 1 of 3
(819 Views)
2 REPLIES 2
Re: htaccess rewrite help
07-07-2010 5:27 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
The re-write rule is doing exactly what you have told it to do, and the browser address bar reflects this. So if a user types in http://www.mydomain.co.uk/blog ; into there address bar, the web server re-writes it as http://ccgi.username.force9.co.uk.
I think you what you should really be doing is having your domain pointed to your CGI space. You should take a look at the following thread http://community.plus.net/forum/index.php/topic,86525.0.html
Hope this helps.
I think you what you should really be doing is having your domain pointed to your CGI space. You should take a look at the following thread http://community.plus.net/forum/index.php/topic,86525.0.html
Hope this helps.
Message 2 of 3
(229 Views)
Re: htaccess rewrite help
07-07-2010 5:30 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hi OM,
If I understand what you're trying to do correctly, you can't use a rewrite to fake the host. You could use a frameset as the index to your blog directory and point the frame at your blog - the url bar would display http://www.mydomain.co.uk/blog and wouldn't change as you navigate the blog. Or, you could point the ccgi subdomain of mydomain at the ccgi platform, if you'd be happy with the url bar displaying http://ccgi.mydomain.co.uk/. Or, you could move the rest of your site to ccgi and point the domain and www at that. If that makes sense.
Gabe
edit: tle beat me to it.
If I understand what you're trying to do correctly, you can't use a rewrite to fake the host. You could use a frameset as the index to your blog directory and point the frame at your blog - the url bar would display http://www.mydomain.co.uk/blog and wouldn't change as you navigate the blog. Or, you could point the ccgi subdomain of mydomain at the ccgi platform, if you'd be happy with the url bar displaying http://ccgi.mydomain.co.uk/. Or, you could move the rest of your site to ccgi and point the domain and www at that. If that makes sense.
Gabe
edit: tle beat me to it.
Message 3 of 3
(229 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