PDA

View Full Version : Blog redirection mod_rewrite


cclaerhout
Thu 30th Aug '07, 10:32am
Hello, coud you please enable "username" variable for "blog.php", like it's already the case for "member.php". I would like to make this redirection :

RewriteRule ^blog/(.*)$ /forum/blog.php?username=$1 [R=302,L]

Thank you

Zachery
Thu 30th Aug '07, 10:36am
It should already be there, I pestered freddie about it in the beta.

http://www.vbulletin.com/forum/blog.php?username=Zachery

cclaerhout
Thu 30th Aug '07, 10:56am
Sorry it's working. I misdunderstood "Blog Entries" page and my personal blog page. Thank you ^^ I was expecting a error message instead of "blog entries" page. By the way, i've just noticed something different, when you enter a username that has no blog page, the display isn't the same on my website than here :
http://www.forumasie.com/forum/blog.php?username=technologue
http://www.vbulletin.com/forum/blog.php?username=p23

I prefer yours :) ^^

noppid
Thu 30th Aug '07, 11:25am
By the way, i've just noticed something different, when you enter a username that has no blog page, the display isn't the same on my website than here :
http://www.forumasie.com/forum/blog.php?username=technologue
http://www.vbulletin.com/forum/blog.php?username=p23

I prefer yours :) ^^

This is odd too, since we're on error messages. This is what we get as a message when we try to go to a blog, as a guest, owned by a member set to invisible on the forum...

http://www.riderinfo.com/forums/blog.php?b=2

cclaerhout
Thu 30th Aug '07, 11:33am
Here is another solution for a better redirection

Open your .htaccess file located in the root of your website
Add this line :
RewriteEngine on
RewriteRule ^blog/(.*)$ /forum/blog.php?username=$1 [L]N.B : don't put again "RewriteEngine on" if it's already above

Open the BLOG template
Search :
$headincludeand ADD ABOVE :
<base href="$vboptions[bburl]/" />Everything should work fine now

Example : http://www.forumasie.com/blog/sedo

indie
Thu 30th Aug '07, 12:28pm
By the way, i've just noticed something different, when you enter a username that has no blog page, the display isn't the same on my website than here :
http://www.forumasie.com/forum/blog.php?username=technologue
http://www.vbulletin.com/forum/blog.php?username=p23

Has to do with if the user has visited their blog page, or if you have run the blog user counter, which will show the more detailed page after. I wish it would not create db entries for blog users that do not have blog creation permissions, it just takes up space, I prefer the short message that the blog does not exist.

indie
Thu 30th Aug '07, 12:41pm
Here is another solution for a better redirection

Open your .htaccess file located in the root of your website
Add this line :
RewriteEngine on
RewriteRule ^blog/(.*)$ /forum/blog.php?username=$1 [L]N.B : don't put again "RewriteEngine on" if it's already above

Open the BLOG template
Search :
$headincludeand ADD ABOVE :
<base href="$vboptions[bburl]/" />Everything should work fine now

Example : http://www.forumasie.com/blog/sedo
Any way to have it display as the default, so they know they can use this URL? Thanks

Freddie Bingham
Thu 30th Aug '07, 4:19pm
Has to do with if the user has visited their blog page, or if you have run the blog user counter, which will show the more detailed page after. I wish it would not create db entries for blog users that do not have blog creation permissions, it just takes up space, I prefer the short message that the blog does not exist.
http://www.vbulletin.com/forum/project.php?issueid=23064

cclaerhout
Thu 30th Aug '07, 4:26pm
Thank you !!!
I've pressed "Rebuild Blog User Information" and that has solved the display problem :)

indie
Thu 30th Aug '07, 5:42pm
http://www.vbulletin.com/forum/project.php?issueid=23064

Thanks. I've added to your post there.