Welcome to the E-Blah Community!
We would like to welcome you to our community and invite you to register an account or login.
Being a registered member is important, as it gives you several advantages over the normal Guest status. After registering you will be able to download files and images, post messages, and access member-only portions of the forum - just to name a few. Registration is quick and simple, and only takes about a minute of your time.

E-Blah Community    Informational    Forum Updates  ›  mod_rewrite and E-Blah
Users Browsing Forum
No Members and 6 Guests

mod_rewrite and E-Blah  This thread currently has 13,560 views. Print
6 Pages « 1 2 3 4 5 6 » Recommend Thread
sundance
December 12, 2005, 12:53pm Report to Moderator Report to Moderator

E-Blah Member
Alpaca Farmer
Posts: 353
Posts Per Day: 0.26
Reputation: 92.31%
Reputation Score: +12 / -1
Time Online: 3 days 5 hours 40 minutes
Location: Indiana, US
oh... good. i just sent you a PM before reading this asking if it was still an issue.

btw, adding the trailing slash, while it fixed the Password Change and Forum Validation links in emails... sigh... I'm back to having two slashes in the Admin's validation New Member email. The link looks like this:
http://mydomain.com/forum//Blah.pl?v=admin,a=validate

With mod_rewrite ON, I'm guessing it probably shouldn't be adding the Blah.pl in these links either.

maybe this might be a hint to the problem... hoping.

Revision History (2 edits)
sundance  -  December 12, 2005, 2:09pm
sundance  -  December 12, 2005, 2:08pm
Logged Offline
Private Message Private message Reply: 45 - 84
Justin
December 12, 2005, 5:50pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,016
Gender: Male
Posts Per Day: 6.75
Reputation: 93.40%
Reputation Score: +297 / -21
Time Online: 36 days 17 hours 49 minutes
Location: Tallassee, AL
Age: 21
Save your Directory settings after you make the changes.  Also make sure you make the changes CORRECTLY to Blah.pl.


I do installs for $25 and upgrades for $20.
Technical support is always free.

  Donate to E-Blah!  

My Websites: Revolution Reality (My Blog)  |  MinistryTalk.com  |  Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV

Logged Offline
Site Site Private Message Private message Reply: 46 - 84
Craig
December 13, 2005, 1:26pm Report to Moderator Report to Moderator

SQL Support Team
Posts: 3,619
Gender: Male
Posts Per Day: 2.23
Reputation: 97.73%
Reputation Score: +215 / -5
Time Online: 14 days 14 hours 57 minutes
Location: Germany
Age: 38
Justin, you have access to my blahdocs.com ftp.  Can you take a look at it and let me know what I have done wrong.  If I take the / off the end of the forum address, then the news on the main page doesn't work.


Don't just ask a question.
Instead ask a question, give us a screen shot and post a link to your forum.
Help us help you make your forum better!


If I helped...increase my Reputation by clicking here.
Logged Offline
Site Site Private Message Private message ICQ ICQ Reply: 47 - 84
sundance
December 14, 2005, 5:54am Report to Moderator Report to Moderator

E-Blah Member
Alpaca Farmer
Posts: 353
Posts Per Day: 0.26
Reputation: 92.31%
Reputation Score: +12 / -1
Time Online: 3 days 5 hours 40 minutes
Location: Indiana, US
Quoted from sundance

.htaccess looks like this:
Code
Options All Indexes
IndexOptions FancyIndexing
RewriteEngine On
RewriteBase /forum
RewriteRule ^(.*) /cgi-bin/bb/Blah.pl?$1


And the lines in Blah.pl looks like this:
Code
$scriptname = '/forum/';
$modrewrite = ''; # mod_rewrite: on = '' | off = '?'


And the setting for the Global url looks like this:
Code
$realurl = "http://mydomain.com/forum";


My observations with these settings are:
  • News - /forum/forum inside the thread topic, Read Comments, Click here to read more links... but the links work. All other links on the portal page are fine.
  • Change Password email - /forum/forum inside the links... but the links work.
  • Forum Validation email -  /forum/forum inside the links... but the links work.
  • PM notification email - /forum/forum inside the links... but the links work.
  • New Reply notification email - /forum/forum inside the links... but the links work.
  • New Member email - /forum/Blah.pl and /forum/Blah.pl?v=admin,a=validate inside the links... but the links work.

Is it supposed to look this way? And why is it only showing /forum/forum on selected links instead of all links?
Logged Offline
Private Message Private message Reply: 48 - 84
Justin
December 14, 2005, 10:32am Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,016
Gender: Male
Posts Per Day: 6.75
Reputation: 93.40%
Reputation Score: +297 / -21
Time Online: 36 days 17 hours 49 minutes
Location: Tallassee, AL
Age: 21
Let me have your FTP info and I'll fix it for you.


I do installs for $25 and upgrades for $20.
Technical support is always free.

  Donate to E-Blah!  

My Websites: Revolution Reality (My Blog)  |  MinistryTalk.com  |  Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV

Logged Offline
Site Site Private Message Private message Reply: 49 - 84
Craig
December 14, 2005, 1:23pm Report to Moderator Report to Moderator

SQL Support Team
Posts: 3,619
Gender: Male
Posts Per Day: 2.23
Reputation: 97.73%
Reputation Score: +215 / -5
Time Online: 14 days 14 hours 57 minutes
Location: Germany
Age: 38
Ok, I finally got it.  Here it is, and I think this has already been said in the other post, but it just hit me like a brick!

Edit Blah.pl and change the $scriptnae and $modrewrite to this:
Code
$scriptname = '/forum/';
$modrewrite = ''; # mod_rewrite: on = '' | off = '?'


Now create a folder on your server at your root called forum and put an .htaccess file in it.  The contents of this .htaccess file should be this:
Code
Options All Indexes
IndexOptions FancyIndexing

RewriteEngine On

RewriteBase /forum

RewriteRule ^(.*) /cgi-bin/bb/Blah.pl?$1


This is assuming that your forum is installed in a folder under your cgi-bin folder called bb.  If your forum is installed in a different directory then change that setting to the approiate name.

Now edit your Forum Address (URL): via your admin center or by editing your Settings.pl file and change the address to your forum to this:
http://www.yoursite.com
Note: use your read site address instead of yoursite.  Also note that you should not put a / at the end.

That should work on any UNIX box that allows you to use mod-rewrite.


Don't just ask a question.
Instead ask a question, give us a screen shot and post a link to your forum.
Help us help you make your forum better!


If I helped...increase my Reputation by clicking here.
Logged Offline
Site Site Private Message Private message ICQ ICQ Reply: 50 - 84
thanetm
December 14, 2005, 2:45pm Report to Moderator Report to Moderator

Having fun, Charity Mini Runs...
Posts: 177
Gender: Female
Posts Per Day: 0.16
Reputation: 100.00%
Reputation Score: +5 / -0
Time Online: 12 days 5 hours 9 minutes
Location: Planet Thanet, Kent, UK
Age: 32
fantastic! that worked! Thank you.


Please support us - we're raising money for Demelza House Children's Hospice, by driving from Land's End to John O'Groats.
http://www.justgiving.com/blowin_tyres



Having Fun, Charity Mini Runs
Raising money...Raising Smiles
Children's Hospice South West & Demelza House Children's Hospice

http://www.smallcarsbighearts.co.uk | http://www.blowin-tyres.co.uk | http://www.ndmr-soapbox.co.uk
Logged Offline
Site Site Private Message Private message Reply: 51 - 84
sundance
December 14, 2005, 6:34pm Report to Moderator Report to Moderator

E-Blah Member
Alpaca Farmer
Posts: 353
Posts Per Day: 0.26
Reputation: 92.31%
Reputation Score: +12 / -1
Time Online: 3 days 5 hours 40 minutes
Location: Indiana, US
Whoo-hoo!!

i couldn't figure out where that extra /forum was from.

THanks Much!

that fixed everything!!!!!  If i could up your rep i would... but i already did some time ago  
Logged Offline
Private Message Private message Reply: 52 - 84
rastoma
January 7, 2006, 11:23pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 32
Posts Per Day: 0.03
Reputation: 100.00%
Reputation Score: +1 / -0
Time Online: 7 hours 54 minutes
thanks craig for going over that again.  i know it's basically the same thing that Justin posted, but the location of the forum directory threw me off.  I thought I was suppose to put it inside my cgi-bin directory.

but something has happened that's strange since this rewrite deal.

when i first load the forum the first time either typing the url or clicking on the link from my main site, I get an error in IE in the bottom left that when clicked on says:

Line: 167
Char: 4
Error: 'swdith' is undefined
Code: 0
URL:  (lists my main url)


when i click on a topic and additional postings the error goes away, until I go back to home (home on the forum).

FF doens't show any errors.

i don't remember seeing this before making the modrerite changes


Logged Offline
Private Message Private message Reply: 53 - 84
BadOscar
January 14, 2006, 6:44pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 8
Posts Per Day: 0.01
Time Online: 2 hours 45 minutes
Just upgraded from version 9.2 and the Password Change and Forum Validation links in emails were missing a forward slash. So they would not work.

Code
In QuickCore.pl
sub CheckCookies

the line (v9.2):
$rurl = "$realurl/$scriptname?";

has been changed to (v9.6):
$rurl = "$realurl$scriptname";
if($modrewrite eq '?') { $rurl .= $modrewrite; }

added back in the forward slash and all is well now:
$rurl = "$realurl/$scriptname";
if($modrewrite eq '?') { $rurl .= $modrewrite; }


Is this a bug for those not using the mod_rewrite, or should I fix it another way?

Logged Offline
Site Site Private Message Private message Reply: 54 - 84
Justin
January 14, 2006, 7:52pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,016
Gender: Male
Posts Per Day: 6.75
Reputation: 93.40%
Reputation Score: +297 / -21
Time Online: 36 days 17 hours 49 minutes
Location: Tallassee, AL
Age: 21
Actually, it was a problem with the first post (which I just edited).

Change the following in Blah.pl:

Code
$scriptname = '';
$modrewrite = '/forum/'; # mod_rewrite: on = '' | off = '?'


To:

Code
$scriptname = '/forum/';
$modrewrite = ''; # mod_rewrite: on = '' | off = '?'


Then go to Admin/Settings and click "Save" (view all settings).  This SHOULD fix your problem.  It's undocumented stuff, really.  I should document more, but I'm bad at it.  Craig does a pretty good job at keeping things up to date, but there's a lot of stuff I add that I think he doesn't see right away.  


I do installs for $25 and upgrades for $20.
Technical support is always free.

  Donate to E-Blah!  

My Websites: Revolution Reality (My Blog)  |  MinistryTalk.com  |  Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV

Logged Offline
Site Site Private Message Private message Reply: 55 - 84
BadOscar
January 15, 2006, 11:05pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 8
Posts Per Day: 0.01
Time Online: 2 hours 45 minutes
That looks correct, but it does not fix the bug that exists if you are NOT using mod_rewrite. If you fix the bug, well, then your code above will not work again. Read my post again, you will see what i mean. I think you will want to fix it.
Logged Offline
Site Site Private Message Private message Reply: 56 - 84
Justin
January 15, 2006, 11:19pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,016
Gender: Male
Posts Per Day: 6.75
Reputation: 93.40%
Reputation Score: +297 / -21
Time Online: 36 days 17 hours 49 minutes
Location: Tallassee, AL
Age: 21
Oh, you didn't enable mod_rewrite?  Then just go and save your settings.  It adds an extra slash for you when you save it (thus fixing your little problem).  


I do installs for $25 and upgrades for $20.
Technical support is always free.

  Donate to E-Blah!  

My Websites: Revolution Reality (My Blog)  |  MinistryTalk.com  |  Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV

Logged Offline
Site Site Private Message Private message Reply: 57 - 84
BadOscar
January 16, 2006, 1:30pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 8
Posts Per Day: 0.01
Time Online: 2 hours 45 minutes
Hey it says it right on that screen too...
"If the mod_rewrite modification is turned OFF, you should add a trailing slash here."

Must have missed that. All the settings were right so I never hit save when I upgraded.

Thanks very much Justin. I really like the code it was so easy to mod and get exactly what I wanted for a custom portal on my site.
Logged Offline
Site Site Private Message Private message Reply: 58 - 84
Asharad
February 8, 2006, 6:45pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 40
Posts Per Day: 0.04
Time Online: 16 hours 10 minutes
I'm still struggling with this thing.  mod_rewrite works on my site.  I tested with a simple redirect from one directory to another.  But when I follow the instructions above I get errors.
Logged Offline
Private Message Private message Reply: 59 - 84
6 Pages « 1 2 3 4 5 6 » Recommend Thread
Print

E-Blah Community    Informational    Forum Updates  ›  mod_rewrite and E-Blah

Thread Tags