Recent Topics

1 Aug 30, 2006 18:01    

I was able to setup a subdomain url for an existing blog.
http://gameshogun.ws/index.php/links/ or http://gameshogun.ws/links/ can now be accessed via http://links.gameshogun.ws/

It's all good.

Though, b2e itself, when generating links for the blog is including the index.php in the URI. The no index.php .htaccess code do not kicks in for this (the code shown below)


# If we have an .html file for the bare subject (no extra path, no query string), use it:
RewriteCond %{REQUEST_FILENAME}.html  -s
RewriteCond %{QUERY_STRING}  ^$
RewriteRule ^(links)/?$  $1.html

# If the subject/extrapath does not match an existing file, call b2evo!
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^(links)(/.*)?$  $1.php

So I also changed the other setting Explicit reference to a stub file, the way it should be to remove the index.php

It works, it's good, coz it still keeps all the old links active, example -
OLD URLs like these will still work:
http://domain.tld/index.php/blogname/$1
http://domain.tld/blogname/$1

NEW valid URLs:
http://blogname.domain.tld/index.php/blogname/$1
http://blogname.domain.tld/blogname/$1

Cool, with this setup, I am able to removed the dreaded index.php from b2e URL generation process. BUT, I'm still stuck with b2e generating the stubname as well.

All links generated now are always in this format: http://blogname.domain.tld/blogname/$1

Now I want b2e not to produce the 'blogname' since its already the subdomain. If I switch the setting back to Automatic Detection by index.php, b2e will instead produce index.php (as well as OLD URLs without the index.php will stop to work).

Anyone here who knows how to keep b2e to produce the proper URL?

----

For the second and last question, regarding .htaccess HTTP 301 Permanent Redirect.

How should I write the syntax to redirect these URLs:
http://domain.tld/index.php/blogname/$1 -> http://blogname.domain.tld/$1

http://domain.tld/blogname/$1 -> http://blogname.domain.tld/$1

My current code:


RewriteCond %{HTTP_HOST} ^([a-z0-9-]+\.)?gameshogun\.info$
RewriteRule (.*) http://gameshogun.ws/$1 [R=301]

RewriteCond %{HTTP_HOST} ^www\.gameshogun\.ws$
RewriteRule (.*) http://gameshogun.ws/$1 [R=301]

If I add either or all of these:


RewriteCond %{HTTP_HOST} ^www\.gameshogun\.ws/blogname$
RewriteRule (.*) http://blogname.gameshogun.ws/$1 [R=301]

RewriteCond %{HTTP_HOST} ^www\.gameshogun\.ws/index.php$
RewriteRule (.*) http://blogname.gameshogun.ws/$1 [R=301]

RewriteCond %{HTTP_HOST} ^www\.gameshogun\.ws/index.php/blogname$
RewriteRule (.*) http://blogname.gameshogun.ws/$1 [R=301]

It doesn't work. It is as if apache do not recognize redirection beyond the .tld part.

Thank you very much to all.

2 Sep 02, 2006 11:33

I was looking for this exact same thing. My blog is getting a new home (hopefully). Hopefully someone knows this.

3 Sep 17, 2006 09:33

Update to the permanent redirect .htaccess code


Options +FollowSymlinks
RewriteEngine On

RewriteBase /

RewriteCond %{HTTP_HOST} ^([a-z0-9-]+\.)?gameshogun\.info$ [NC,OR]
RewriteCond %{HTTP_HOST} ^([a-z0-9-]+\.)?gameshogun\.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^([a-z0-9-]+\.)?gameshogun\.net$ [NC,OR]
RewriteCond %{HTTP_HOST} ^([a-z0-9-]+\.)?gameshogun\.org$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www\.gameshogun\.ws$ [NC]
RewriteRule ^(.*) http://gameshogun.ws/$1 [R=301,L]

If someone needs it ;)

4 Nov 03, 2006 09:41

Hello,

I try to do the same, but I have always an error page, from my internet provider.

Actually, I just make this type of change :
http://myhost.net/login instead of http://myhost.net/myfolder/login/

But I would like this http://login.myhost.net/

I try a lot of solution but without result.

Thanks for your help..

My .htaccess file is actually like that (and it woks like it !)

Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)(/(.*))?$ /free/$1/index.php/$3

(free is my folder)

I try this :
Options +FollowSymlinks
RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} ^([a-z0-9-]+\.)?myhost\.net$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www\.myhost\.net$ [NC]
RewriteRule ^(.*) http://dreamblog.net/free/$1 [R=301,L]

With http://myhost.net I have an error page with adress : http://myhost.net/free/free/free/free/free ...
With http://login.myhost.net/ I have an error page from my provider.

Thanks for your help


Form is loading...