News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Pretty URLs

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

Previous topic - Next topic

sAce

QuoteAre you using 0.9?

yes, plzz help

bigboss2

Hi danni. click on any url of feed. You will notice that it goes to homepage rather any specific topic.  http://www.cricket-highlights.com/.xml/?type=rss [nofollow]

bigboss2

ok. It looks problem was with .htaccess. I added some rewrite which affected urls of rss. Thanks dannii..

sAce

ok my attachment issue is now resolved.

thank u

locau


QuoteThe main ideia is since this is a SEF mod is there any way i can edit or change a given url name
    from www.domain.com/xtest to www.domain.com/test ?
if you notice i remove the "x" from "xtest", some sort of edit option on the listed urls
What is xtest? A board? An action?
[/quote]

Xtest is an action (i used this name as a example because the name that appears is another one)

asmith

here, from 2640 to 2667  (the function starts exactly at 2640)

function obExit($header = null, $do_footer = null, $from_index = false)
{
global $context, $settings, $modSettings, $txt;
static $header_done = false, $footer_done = false;

// Clear out the stat cache.
trackStats();

$do_header = $header === null ? !$header_done : $header;
if ($do_footer === null)
$do_footer = $do_header;

// Has the template/header been done yet?
if ($do_header)
{
// Start up the session URL fixer.
ob_start('ob_sessrewrite');

// Just in case we have anything bad already in there...
if ((isset($_REQUEST['debug']) || isset($_REQUEST['xml']) || (WIRELESS && WIRELESS_PROTOCOL == 'wap')) && in_array($txt['lang_locale'], array('UTF-8', 'ISO-8859-1')))
ob_start('validate_unicode__recursive');

if (!empty($settings['output_buffers']) && is_string($settings['output_buffers']))
$buffers = explode(',', $settings['output_buffers']);
elseif (!empty($settings['output_buffers']))
$buffers = $settings['output_buffers'];
else
$buffers = array();

Dannii

thegiftedhands, you shouldn't have two SSI.php files. But upload the new one to where the index.php that you use to access the forum is. Then open that new file in your browser.

sbmcos, Good to hear it works now :)

Quote from: locau on January 26, 2009, 11:34:11 AM
Xtest is an action (i used this name as a example because the name that appears is another one)
Well you could try editing PrettyUrls-Filters.php to do something specific for that action, but I wouldn't recommend it, it sounds dangerous.

asmith, I'm guessing the shoutbox mod is calling obExit() when it shouldn't. Can you ask the shoutbox mod's author 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."

asmith

why when I disable pretty urls it works fine?

apadong.net

Quote from: Dannii on January 26, 2009, 06:13:06 AM
Have you set it up to allow mod_rewrite and .htaccess? Did you check the server log like it suggested?
I'm tested in localhost with WAMP.
The log said:
Quotehttp://localhost/forum1/index.php?action=forum
8: Undefined index: pretty_enable_filters
File: D:\WAMP\www\forum1\Sources\QueryString.php
Line: 518

and, when i'm checking to the file QueryString.php:
// Rewrite the buffer with Pretty URLs!
if ($modSettings['pretty_enable_filters'])
{
require_once($sourcedir . '/PrettyUrls-Filters.php');
$buffer = pretty_rewrite_buffer($buffer);
}



so please, help me what should i do :(

Carloswaldo

Quote from: Carloswaldo on January 02, 2009, 01:50:59 PM
I've got a problem with Pretty URLs, I changed my hosting, reload the db backup, everything is fine, except when I try to install again the Pretty URLs mod, it gives me the urls of the previous hosting, how can I fix it?

ffingers

i have what i think is a simple problem, but as i am unfamiliar with mod_rewrite rules, i don't know how to fix it....

my domain cbrjunkie.com does not point to the root of my hosting....rather...i have the domain pointing directly to the /forum directory....what that means....

rather than the traditional format of http://cbrjunkie.com/forum/index.php

my site accesses the the forum via http://cbrjunkie.com - that is without the /forum

when i turn on pretty urls, what happens is i get a 404 error saying it can't find /forum/index.php so what i am assuming is happening is that pretty urls is masking the urls using the assumption that the initial locations are based out of /forums

since mine TECHNICALLY are but the domain doesn't seem them this way, i need to remove the masking of the /forums part...

is that understandable...lol...

anyways...any thoughts as to how to change this?

yourdailysaver

hi buddy . i need your urgent help . i have installed your pretty url mode on my forum www.bollychilli.com and i have enabled option for rewriting urls. now my forum has stopped working i am not able to go anywhere not in admin panel also. please help me out what to do now it shows 404 page not found in every option of my board. please reply me on my email asu.com@gmail.com

sAce

Quote from: yourdailysaver on January 27, 2009, 04:53:04 PM
hi buddy . i need your urgent help . i have installed your pretty url mode on my forum www.bollychilli.com and i have enabled option for rewriting urls. now my forum has stopped working i am not able to go anywhere not in admin panel also. please help me out what to do now it shows 404 page not found in every option of my board. please reply me on my email asu.com@gmail.com

well it seemd to be working now, but when u enable the mod, only enable rewrite for borads,topics,profiles, leave actions out of it , ok!

goldenboy48

I'm using 0.8.4. My site had about 700 Guests online. Site went down and host sent me this message:

QuoteHi,

I found a couple hundred of these:

| 334 | ecricnet_smf1 | localhost | ecricnet_smf1 | Query | 10 | Locked | SELECT url_id, replacement
FROM smf_pretty_urls_cache
WHERE url_id IN ('http://ecric.net/The |


Your site is the one causing this again...

I had to suspend it to get the load back down to normal. You'll have to remove that MOD.

Is it safe to use 0.9?

tdot

I have a bizarre problem and wondering if anyone has run into this.

The mod installs fine and every page works like it should EXCEPT the private message page.  When i click on the link to that page I just get a blank white page with no information and no error messages.  If  I unselect  the pretty urls admin setting 'enable URL rewritting' I can reach my private messages.  If i turn on URL rewritting, and even unselect the 'action' button, the PM area is still white

any suggestions?

dgrose

#2955
Hi,
I have installed Pretty URLs 0.9 to my forum, which is set up on IIS7 with the URL rewrite module.
I can type a freindly url, like hxxp:www.cooksongold.com/forum/general-discussion [nonactive] and it goes to the correct page, but all the links on the forum pages point to the original urls containing index.php?action=......
Is there something in the mod checking what type of server the forum is hosted on, and if there is is there a way to bypass it?
Thanks
Dave

JoshieDaMan

I need another piece of code. In arcade, after you save score. It will take you error page "you cannot save score" but then I disabled pretty url action, it would save score. How can I get it to save score while using action prettyurl to save score?

Not Found

The requested URL /arcade/index.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


Saving score redirect "index.php?action=arcade"

SergeantAsh

I seem to have a problem with PrettyURLs, it occurs when an email is sent due to an updated topic - I click the link in the email and almost immediately get a 503 error from my server - if I hit refresh, it then works fine?

The link in the email is a NON prettyURL format, after I click the link smf seems to redirect to the PrettyURL version, thats when the 503 hits.

Any ideas?
Quote"Moderation has been called a virtue to limit the ambition of great men, and to console undistinguished people for their want of fortune and their lack of merit."

L'AltroWeb

@Dannii:
I've test to edit like this: $htaccess = str_replace('#ACTIONS', $actions_rewrite, $htaccess);
}

$htaccess = '
# beginning of directives for Apache Error Handling modification
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*)  /forum/index.php?action=error;code=404
ErrorDocument 400 /forum/index.php?action=error;code=400
ErrorDocument 401 /forum/index.php?action=error;code=401
ErrorDocument 402 /forum/index.php?action=error;code=402
ErrorDocument 403 /forum/index.php?action=error;code=403
ErrorDocument 404 /forum/index.php?action=error;code=404
ErrorDocument 405 /forum/index.php?action=error;code=405
ErrorDocument 406 /forum/index.php?action=error;code=406
ErrorDocument 407 /forum/index.php?action=error;code=407
ErrorDocument 408 /forum/index.php?action=error;code=408
ErrorDocument 409 /forum/index.php?action=error;code=409
ErrorDocument 410 /forum/index.php?action=error;code=410
ErrorDocument 411 /forum/index.php?action=error;code=411
ErrorDocument 412 /forum/index.php?action=error;code=412
ErrorDocument 413 /forum/index.php?action=error;code=413
ErrorDocument 414 /forum/index.php?action=error;code=414
ErrorDocument 415 /forum/index.php?action=error;code=415
ErrorDocument 416 /forum/index.php?action=error;code=416
ErrorDocument 417 /forum/index.php?action=error;code=417
ErrorDocument 500 /forum/index.php?action=error;code=500
ErrorDocument 501 /forum/index.php?action=error;code=501
ErrorDocument 502 /forum/index.php?action=error;code=502
ErrorDocument 503 /forum/index.php?action=error;code=503
ErrorDocument 504 /forum/index.php?action=error;code=504
ErrorDocument 505 /forum/index.php?action=error;code=505
# end of directives for Apache Error Handling modification';

// Output the file
$handle = fopen($boarddir . '/.htaccess', 'w');
but this is my htaccess after a maintenance:

# beginning of directives for Apache Error Handling modification
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*)  /forum/index.php?action=error;code=404
ErrorDocument 400 /forum/index.php?action=error;code=400
ErrorDocument 401 /forum/index.php?action=error;code=401
ErrorDocument 402 /forum/index.php?action=error;code=402
ErrorDocument 403 /forum/index.php?action=error;code=403
ErrorDocument 404 /forum/index.php?action=error;code=404
ErrorDocument 405 /forum/index.php?action=error;code=405
ErrorDocument 406 /forum/index.php?action=error;code=406
ErrorDocument 407 /forum/index.php?action=error;code=407
ErrorDocument 408 /forum/index.php?action=error;code=408
ErrorDocument 409 /forum/index.php?action=error;code=409
ErrorDocument 410 /forum/index.php?action=error;code=410
ErrorDocument 411 /forum/index.php?action=error;code=411
ErrorDocument 412 /forum/index.php?action=error;code=412
ErrorDocument 413 /forum/index.php?action=error;code=413
ErrorDocument 414 /forum/index.php?action=error;code=414
ErrorDocument 415 /forum/index.php?action=error;code=415
ErrorDocument 416 /forum/index.php?action=error;code=416
ErrorDocument 417 /forum/index.php?action=error;code=417
ErrorDocument 500 /forum/index.php?action=error;code=500
ErrorDocument 501 /forum/index.php?action=error;code=501
ErrorDocument 502 /forum/index.php?action=error;code=502
ErrorDocument 503 /forum/index.php?action=error;code=503
ErrorDocument 504 /forum/index.php?action=error;code=504
ErrorDocument 505 /forum/index.php?action=error;code=505
# end of directives for Apache Error Handling modification
(only this code)  :-[

Dannii

Quote from: asmith on January 27, 2009, 12:18:00 AM
why when I disable pretty urls it works fine?
Because then it's only calling obExit() once I guess...

Quote from: apadong.net on January 27, 2009, 02:36:19 AM
I'm tested in localhost with WAMP.
The log said:
Quotehttp://localhost/forum1/index.php?action=forum
8: Undefined index: pretty_enable_filters
File: D:\WAMP\www\forum1\Sources\QueryString.php
Line: 518

and, when i'm checking to the file QueryString.php:
// Rewrite the buffer with Pretty URLs!
if ($modSettings['pretty_enable_filters'])
{
require_once($sourcedir . '/PrettyUrls-Filters.php');
$buffer = pretty_rewrite_buffer($buffer);
}



so please, help me what should i do :(
Did you check the server log? That sure looks like the SMF log which will have different info.
And, that error will disappear when you enable the mod, it's not the problem.

Quote from: Carloswaldo on January 27, 2009, 01:00:56 PM
I've got a problem with Pretty URLs, I changed my hosting, reload the db backup, everything is fine, except when I try to install again the Pretty URLs mod, it gives me the urls of the previous hosting, how can I fix it?
http://code.google.com/p/prettyurls/wiki/TroubleShooting
Follow the second section then run maintenance.

Quote from: ffingers on January 27, 2009, 01:43:31 PM
i have what i think is a simple problem, but as i am unfamiliar with mod_rewrite rules, i don't know how to fix it....

my domain cbrjunkie.com does not point to the root of my hosting....rather...i have the domain pointing directly to the /forum directory....what that means....

rather than the traditional format of http://cbrjunkie.com/forum/index.php

my site accesses the the forum via http://cbrjunkie.com - that is without the /forum

when i turn on pretty urls, what happens is i get a 404 error saying it can't find /forum/index.php so what i am assuming is happening is that pretty urls is masking the urls using the assumption that the initial locations are based out of /forums

since mine TECHNICALLY are but the domain doesn't seem them this way, i need to remove the masking of the /forums part...

is that understandable...lol...

anyways...any thoughts as to how to change this?
Did you ever move the forum? Try doing the second section of the trouble shooting page too.

Quote from: yourdailysaver on January 27, 2009, 04:53:04 PM
hi buddy . i need your urgent help . i have installed your pretty url mode on my forum www.bollychilli.com and i have enabled option for rewriting urls. now my forum has stopped working i am not able to go anywhere not in admin panel also. please help me out what to do now it shows 404 page not found in every option of my board. please reply me on my email asu.com@gmail.com
Please follow the first section of the trouble shooting page.

Quote from: PanesarV on January 28, 2009, 01:31:45 AM
I'm using 0.8.4. My site had about 700 Guests online. Site went down and host sent me this message:

QuoteHi,

I found a couple hundred of these:

| 334 | ecricnet_smf1 | localhost | ecricnet_smf1 | Query | 10 | Locked | SELECT url_id, replacement
FROM smf_pretty_urls_cache
WHERE url_id IN ('http://ecric.net/The |


Your site is the one causing this again...

I had to suspend it to get the load back down to normal. You'll have to remove that MOD.

Is it safe to use 0.9?
Do you have any errors?
And yes it's safe, but it probably won't have any fewer queries. If you have a lot of people online then you're going to make a lot of queries.

Quote from: tdot on January 28, 2009, 03:03:56 AM
I have a bizarre problem and wondering if anyone has run into this.

The mod installs fine and every page works like it should EXCEPT the private message page.  When i click on the link to that page I just get a blank white page with no information and no error messages.  If  I unselect  the pretty urls admin setting 'enable URL rewritting' I can reach my private messages.  If i turn on URL rewritting, and even unselect the 'action' button, the PM area is still white

any suggestions?
Anything in the smf or apache error logs?

Quote from: dgrose on January 28, 2009, 05:25:34 AM
Hi,
I have installed Pretty URLs 0.9 to my forum, which is set up on IIS7 with the URL rewrite module.
I can type a freindly url, like http://www.cooksongold.com/forum/general-discussion and it goes to the correct page, but all the links on the forum pages point to the original urls containing index.php?action=......
Is there something in the mod checking what type of server the forum is hosted on, and if there is is there a way to bypass it?
Thanks
Dave
No it doesn't check what server... have you enabled URL rewriting? Tried running maintenance?

Quote from: JoshieDaMan on January 28, 2009, 06:14:11 AM
I need another piece of code. In arcade, after you save score. It will take you error page "you cannot save score" but then I disabled pretty url action, it would save score. How can I get it to save score while using action prettyurl to save score?

Not Found

The requested URL /arcade/index.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


Saving score redirect "index.php?action=arcade"
Have you tried enabling the arcade filter which can be installed with the extras package?

Quote from: @sh on January 28, 2009, 03:04:20 PM
I seem to have a problem with PrettyURLs, it occurs when an email is sent due to an updated topic - I click the link in the email and almost immediately get a 503 error from my server - if I hit refresh, it then works fine?

The link in the email is a NON prettyURL format, after I click the link smf seems to redirect to the PrettyURL version, thats when the 503 hits.

Any ideas?
Can you provide any more details? What is the non pretty URL? What does it get redirected to?

Dark-Wolf try this:
      $htaccess = str_replace('#ACTIONS', $actions_rewrite, $htaccess);
   }

   $htaccess += '
      # beginning of directives for Apache Error Handling modification
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule (.*)  /forum/index.php?action=error;code=404
      ErrorDocument 400 /forum/index.php?action=error;code=400
      ErrorDocument 401 /forum/index.php?action=error;code=401
      ErrorDocument 402 /forum/index.php?action=error;code=402
      ErrorDocument 403 /forum/index.php?action=error;code=403
      ErrorDocument 404 /forum/index.php?action=error;code=404
      ErrorDocument 405 /forum/index.php?action=error;code=405
      ErrorDocument 406 /forum/index.php?action=error;code=406
      ErrorDocument 407 /forum/index.php?action=error;code=407
      ErrorDocument 408 /forum/index.php?action=error;code=408
      ErrorDocument 409 /forum/index.php?action=error;code=409
      ErrorDocument 410 /forum/index.php?action=error;code=410
      ErrorDocument 411 /forum/index.php?action=error;code=411
      ErrorDocument 412 /forum/index.php?action=error;code=412
      ErrorDocument 413 /forum/index.php?action=error;code=413
      ErrorDocument 414 /forum/index.php?action=error;code=414
      ErrorDocument 415 /forum/index.php?action=error;code=415
      ErrorDocument 416 /forum/index.php?action=error;code=416
      ErrorDocument 417 /forum/index.php?action=error;code=417
      ErrorDocument 500 /forum/index.php?action=error;code=500
      ErrorDocument 501 /forum/index.php?action=error;code=501
      ErrorDocument 502 /forum/index.php?action=error;code=502
      ErrorDocument 503 /forum/index.php?action=error;code=503
      ErrorDocument 504 /forum/index.php?action=error;code=504
      ErrorDocument 505 /forum/index.php?action=error;code=505
      # end of directives for Apache Error Handling modification';

   //   Output the file
   $handle = fopen($boarddir . '/.htaccess', 'w');
"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."

Advertisement: