Pretty URLs

Started by SMFHacks.com Team, January 31, 2007, 10:56:43 AM

Previous topic - Next topic

Dannii

Quote from: ForumIntegration on June 06, 2009, 11:42:13 AM
Quote from: Dannii on June 06, 2009, 11:37:18 AM
None of those links are opening for me...

No, they are all on my local machine. Not public.
Well, it's going to be super hard to help then!

Can you post smf.php here please.

Quote from: TheDisturbedOne on June 06, 2009, 02:40:13 PM
HOLY #$%^& it worked!  One more small thing.  I ran Pretty URLs about a year ago on a different server, different URL.  Some of the links are sending me to that old URL.  How do I change it?  The forum's URL is correct, but there is probably a line in the database (which I can't find) that controls it.  And yes I have run Pretty URL server maintenance.

And one more thing.  How do I make my htaccess so that I can have the MOD and redirects going simultaneously?
If you're still having problems with old URLs, follow the trouble shooting page.

I don't know what you mean in your second question.

Quote from: fx991 on June 06, 2009, 03:13:36 PM
I found error 500 after installing ... Additionally, a 404 Not Found error was encountered
what to do
which .htaccess has to edit and code
Sounds like you are having problems with mod_security. Ask your host for help.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

ForumIntegration

Quote from: Dannii on June 06, 2009, 10:13:38 PM
Quote from: ForumIntegration on June 06, 2009, 11:42:13 AM
Quote from: Dannii on June 06, 2009, 11:37:18 AM
None of those links are opening for me...

No, they are all on my local machine. Not public.
Well, it's going to be super hard to help then!

Can you post smf.php here please.


Following is related code:



$sp_url = getHTTP() . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'];

ob_start();

header();    // the page header should appear for every forum page

include (SMF_DIR . "/index.php");
$buffer = ob_get_contents();
ob_end_clean();
$forumContent = ob_urlFix($buffer);
echo $forumContent;

/**
* change url links in the forum page
*/
function ob_rbiFix($buffer)
{
    $buffer = ob_sessrewrite($buffer);

    global $scripturl, $sp_url;

    $buffer = str_replace($scripturl, $sp_url, $buffer);

    return $buffer;
}



Actually the code section is pretty much like the "iGamingCMS 1.3.2 Bridge 1.1" on http://download.simplemachines.org/?bridges . I also tested with this bridge, and got the same problem.

TheDisturbedOne

Whoops, I should have looked at that first.  I had a redirect for my domain which redirects to my forum.  Now whatever I chmod my htaccess to, it won't let me add the redirect, and when I add it manually, it doesn't work.  When I get rid of pretty URLs it works though.
Thanks :)

_Anthony_

Quote from: fx991 on June 06, 2009, 03:13:36 PM
I found error 500 after installing ... Additionally, a 404 Not Found error was encountered
what to do
which .htaccess has to edit and code

add RewriteBase /
to .htaccess after the RewriteEngine on

Dannii

Quote from: ForumIntegration on June 06, 2009, 10:28:14 PMFollowing is related code:

Actually the code section is pretty much like the "iGamingCMS 1.3.2 Bridge 1.1" on http://download.simplemachines.org/?bridges . I also tested with this bridge, and got the same problem.
What are you actually trying to do with this code? Also, what exactly is the problem?

Quote from: TheDisturbedOne on June 06, 2009, 10:31:18 PM
Whoops, I should have looked at that first.  I had a redirect for my domain which redirects to my forum.  Now whatever I chmod my htaccess to, it won't let me add the redirect, and when I add it manually, it doesn't work.  When I get rid of pretty URLs it works though.
Thanks :)
What do you mean by "it does't work"?
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

ForumIntegration

Quote from: Dannii on June 06, 2009, 10:46:07 PM
Quote from: ForumIntegration on June 06, 2009, 10:28:14 PMFollowing is related code:

Actually the code section is pretty much like the "iGamingCMS 1.3.2 Bridge 1.1" on http://download.simplemachines.org/?bridges . I also tested with this bridge, and got the same problem.
What are you actually trying to do with this code? Also, what exactly is the problem?

I am trying to give every forum page the header. Without the prettyurls MOD, clicking every links in the forum page, the header will be on every page. With this MOD, only the landing page has the header. Clicking board/topic will lead the browser off to SMF's index.php, therefore, no header appears.

Dannii

Why aren't you using the SMF layers system?
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

ForumIntegration

#3687
Quote from: Dannii on June 06, 2009, 11:19:54 PM
Why aren't you using the SMF layers system?

What do you mean? Could you please provide more details?

Currently, everything is working fine with the bridge solution except the SEO urls. Therefore, I would like to try to make this MOD work.

Tried the SMF built-in SEF option, but their urls are not as pretty as prettyurls'.

Dannii

http://www.simplemachines.org/community/index.php?topic=145838.0
There are a lot of other topics too.

If all you want is to add an extra header and footer you should do that. Only do an integration/bridge if you want to mix SMF with some other software.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

ForumIntegration

Quote from: Dannii on June 06, 2009, 11:30:35 PM
http://www.simplemachines.org/community/index.php?topic=145838.0
There are a lot of other topics too.

If all you want is to add an extra header and footer you should do that. Only do an integration/bridge if you want to mix SMF with some other software.

The extra header and footer is not the only thing I want to do. Actually, I implemented a bridge to integrate SMF with a set of existing sites/software. SMF is like a subsystem embedded in a bigger picture.

Could you point me to the places where the urls are processed? or something I could do in the .htaccess?

Before the MOD,
    board link: http://rocyut1l.b2b.regn.net/forum/index.php?board=1.0
    topic link: http://http://rocyut1l.b2b.regn.net/forum/index.php?topic=1.0

I can change them to
http://rocyut1l.b2b.regn.net/business/smf.php?board=1.0
http://http://rocyut1l.b2b.regn.net/business/smf.php?topic=1.0

And everything works fine. The smf.php will output the correct header and perform all hook functions.

With the MOD,
    board link: http://rocyut1l.b2b.regn.net/forum/general-discussion/
    topic link: http://rocyut1l.b2b.regn.net/forum/general-discussion/welcome-to-smf!/
I do not know what should I do to make sure everything works as expected.

Dannii

Ahh, well that's quite easy really. Go to index.php?action=admin;area=pretty;sa=filters and change all the index.php's to smf.php.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

fx991

Quote from: fx991 on June 06, 2009, 03:13:36 PM
I found error 500 after installing ... Additionally, a 404 Not Found error was encountered
what to do
which .htaccess has to edit and code

Dannii I think i resolve it by making some modification on .htaccess
but a request: please make some modification for SMF 2.0 RC1-1
to install the mod without version emulation

TheDisturbedOne

It wasn't redirecting before, but I have it figured out.  Two last things.  My first board (SMF named it general discussion) has been changed to New and Updates.  How would I change the name of the url for /general-discussion/ to /news-and-updates/?
And the favicon isn't showing :( yet it is in the same directory as the forum and is called favicon.ico.

TheDisturbedOne

Quote from: S-Ace on June 07, 2009, 07:35:36 AM
Quote from: TheDisturbedOne on June 07, 2009, 07:21:06 AM
It wasn't redirecting before, but I have it figured out.  Two last things.  My first board (SMF named it general discussion) has been changed to New and Updates.  How would I change the name of the url for /general-discussion/ to /news-and-updates/?
And the favicon isn't showing :( yet it is in the same directory as the forum and is called favicon.ico.

dont u c a pretty url link beside brd modify ??
I have no idea what you are saying.

TheDisturbedOne

Ah yes that worked, thanks.

Dannii

Quote from: TheDisturbedOne on June 07, 2009, 07:21:06 AM
It wasn't redirecting before, but I have it figured out.  Two last things.  My first board (SMF named it general discussion) has been changed to New and Updates.  How would I change the name of the url for /general-discussion/ to /news-and-updates/?
And the favicon isn't showing :( yet it is in the same directory as the forum and is called favicon.ico.
Well it looks in the folder, so if you're in /board/topic/ it will look for /board/topic/favicon.ico, which won't exist. So explicitly add it to your html too! :)

Quote from: S-Ace on June 07, 2009, 07:35:36 AM
dont u c a pretty url link beside brd modify ??
Maybe write proper English? It will probably be even quicker to type!
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

ForumIntegration

Quote from: Dannii on June 07, 2009, 12:01:34 AM
Quote from: ForumIntegration on June 06, 2009, 11:49:17 PM
The extra header and footer is not the only thing I want to do. Actually, I implemented a bridge to integrate SMF with a set of existing sites/software. SMF is like a subsystem embedded in a bigger picture.

Could you point me to the places where the urls are processed? or something I could do in the .htaccess?

Before the MOD,
    board link: http://rocyut1l.b2b.regn.net/forum/index.php?board=1.0
    topic link: http://http://rocyut1l.b2b.regn.net/forum/index.php?topic=1.0

I can change them to
http://rocyut1l.b2b.regn.net/business/smf.php?board=1.0
http://http://rocyut1l.b2b.regn.net/business/smf.php?topic=1.0

And everything works fine. The smf.php will output the correct header and perform all hook functions.

With the MOD,
    board link: http://rocyut1l.b2b.regn.net/forum/general-discussion/
    topic link: http://rocyut1l.b2b.regn.net/forum/general-discussion/welcome-to-smf!/
I do not know what should I do to make sure everything works as expected.

Ahh, well that's quite easy really. Go to index.php?action=admin;area=pretty;sa=filters and change all the index.php's to smf.php.

The index.php and the smf.php are not in the same directory. I changed all "index.php" to "business/smf.php" and I got error 404. :(

pcigre

I have 0.9 version. What is upgrade procedure to 0.9.3?

Uninstall, install? or?

Özgür

Quote from: pcigre on June 08, 2009, 05:56:27 AM
I have 0.9 version. What is upgrade procedure to 0.9.3?

Uninstall, install? or?

- Uninstall old
- Install new one
So Long

pcigre

Thank you. Looks like it worked fine.

Advertisement: