News:

Wondering if this will always be free?  See why free is better.

Main Menu

SimpleSEF 2.0 (SMF 1.1.x and SMF 2.0)

Started by SlammedDime, December 05, 2009, 10:08:40 PM

Previous topic - Next topic

~DS~

Quote from: SlammedDime on January 23, 2010, 03:55:39 PM
The .htaccess file you need to look at is the on in the main SMF directory, the same place as index.php and SSI.php.  You need to use an FTP client that does not hide 'hidden' files.  On Unix systems, files that begin with a '.' are considered hidden files.
it's not in the SMF directory but on the root, the only hidden file I see is .ftpquota in SMF directory. Maybe I can create  .htaccess using notepad and add the code there?
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

SlammedDime

Yes, that's what you'll have to do.  The mod attempts to create one for you, but if it can't, you need to do it on your own.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

~DS~

Quote from: SlammedDime on January 23, 2010, 05:24:24 PM
Yes, that's what you'll have to do.  The mod attempts to create one for you, but if it can't, you need to do it on your own.
Ok so it's simple as that?
Just add the
QuoteRewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php
and save it as .htaccess.txt?
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Arantor

No, just .htaccess

Windows doesn't like it though so you may have to upload it as .htaccess.txt and rename it over FTP.
Holder of controversial views, all of which my own.


~DS~

Quote from: Arantor on January 23, 2010, 05:33:28 PM
No, just .htaccess

Windows doesn't like it though so you may have to upload it as .htaccess.txt and rename it over FTP.
uh...I'm not using Windows...I am on Mac.

....uploaded...well it crashed the forum. Guess that didn't work. Deleted .htaccess
It's back to normal.
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

feline

Quote from: SlammedDime on January 23, 2010, 03:28:22 PM
The parameters can be in any order Fel, it doesn't really make a difference as far as PHP is concerned, as long as I read them back properly on a request.
Hmm .. not in all situations. when I call a SSI service, the will have parameters in a correct order, that don't not work. It's a problem for you to get the parameters in the order as requested?

Quote
Fel - I do appreciate your input, but it's hardly fair to say this mod has a lot of bugs... it really does not.
That I have not say .. I say a lot of problems .. and that is absolutely correct, I think and I give here many informations and tips, more than any other.
Have you any problem with me or why you attack me at the time?

Fel

Tanshaydar

Thanks SlammedDime, I've installed 1.0.2 and it works properly. No bugs or problems so far. My users will give feedback if anything wrong happens.
Btw, you solved the issue about boards with same name, good to see it; but is there any way to change it? I'd like to show them not as 'boardname2' but 'boardname-2'

SlammedDime

Unfortunately doing the way you propose will mess with which page of that board to show... if you have boards with multiple pages, look at their links and you'll understand why.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Tanshaydar

Oh, I see. It wasn't anything vital anyway.

bjraines

Is there a way to not use and extension after the url,  urls without .html or .php

bjraines

settings were not saved

i clicked save and went back to same screen with no check box in enable SimpleSEF

SlammedDime

Quote from: bjraines on January 25, 2010, 01:14:45 PM
Is there a way to not use and extension after the url,  urls without .html or .php
Unfortunately not, it is how I determine if the link is for a topic or not.

Quote from: bjraines on January 25, 2010, 01:18:01 PM
settings were not saved

i clicked save and went back to same screen with no check box in enable SimpleSEF
Please see the second FAQ on the first post of the topic.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

bjraines

Quote from: SlammedDime on January 25, 2010, 01:38:14 PM
Quote from: bjraines on January 25, 2010, 01:14:45 PM
Is there a way to not use and extension after the url,  urls without .html or .php
Unfortunately not, it is how I determine if the link is for a topic or not.

Thanks for the quick response. This is unfortunate as it makes a conversion from Pretty URL to your great mod undesirable, for some forums that would deindex and reindex 100s of thousand of pages.

Also the convention ever so leans towards no extension for urls these days, thanks to wordpress and other popular content management systems

bjraines

SlammedDime,

Please forgive me because I assure you I am most appreciative of this mod especially considering the stance taken by the Pretty Url moderator

but I do not understand completely why the extension are necessary?

You say here: Unfortunately not, it is how I determine if the link is for a topic or not.

Why is this determination needed?

File extension are like .html and .php are just that, extensions reserved for actual server files, which database generated pages are not either, they are not files but query generated pages

iGate

#334
SMF v1.1.11 & TP 0.9.8.3

could someone help me, i made the neccessary mods to htaccess and this is the page that is thrown up: http://ihf.lp.pl/forums/
if you don't want to follow the link this is what is thrown up and it continues for ages:

SimpleSEF adds 0.03824<
SimpleSEF adds 0.03824
SimpleSEF adds 0.03824!
SimpleSEF adds 0.03824
SimpleSEF adds 0.03824D
SimpleSEF adds 0.03824
SimpleSEF adds 0.03824O
SimpleSEF adds 0.03824
SimpleSEF adds 0.03824C
SimpleSEF adds 0.03824
SimpleSEF adds 0.03824T


any ideas what is wrong?

this is my htaccess, it is located at http://ihf.lp.pl/

AddType application/x-httpd-php .html
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php


EDIT: i've had to rename "SimpleSEF.php" and "SimpleSEF--Db" in order to get my forum usable again whilst this problem is solved.

SlammedDime

Quote from: bjraines on January 27, 2010, 09:54:43 AM
SlammedDime,

Please forgive me because I assure you I am most appreciative of this mod especially considering the stance taken by the Pretty Url moderator

but I do not understand completely why the extension are necessary?

You say here: Unfortunately not, it is how I determine if the link is for a topic or not.

Why is this determination needed?

File extension are like .html and .php are just that, extensions reserved for actual server files, which database generated pages are not either, they are not files but query generated pages
The implication of the format of the urls is to create an URL structure that is that of an actual flat file system, NOT database driven content.  So yes, while this is database driven content and not real files, extensions may not 'make sense', and it really doesn't matter if they have extensions or not as far as search engines go (you could make the extension ".bjraines" if you wanted to), the idea is to simulate a flat file system.  As far as the way I have coded this mod... the only way that I can tell the difference between a board, and a topic (or other pages that might have numbers on the end of them) is to throw a suffix onto the topic, which also logically makes sense if your board were a flat file system.  As far as this mod is concerned, I cannot change this.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

SlammedDime

#336
Quote from: iGate on January 27, 2010, 11:18:07 AM
SMF v1.1.11 & TP 0.9.8.3

could someone help me, i made the neccessary mods to htaccess and this is the page that is thrown up: http://ihf.lp.pl/forums/
if you don't want to follow the link this is what is thrown up and it continues for ages:

SimpleSEF adds 0.03824<
SimpleSEF adds 0.03824
SimpleSEF adds 0.03824!
SimpleSEF adds 0.03824
SimpleSEF adds 0.03824D
SimpleSEF adds 0.03824
SimpleSEF adds 0.03824O
SimpleSEF adds 0.03824
SimpleSEF adds 0.03824C
SimpleSEF adds 0.03824
SimpleSEF adds 0.03824T


any ideas what is wrong?

this is my htaccess, it is located at http://ihf.lp.pl/

AddType application/x-httpd-php .html
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php


EDIT: i've had to rename "SimpleSEF.php" and "SimpleSEF--Db" in order to get my forum usable again whilst this problem is solved.
You don't have to rename the Db folder, just the PHP file would do.  I'll have to look at this closer, something must not be right with the regular expression I use to inject the extra load time into the page.  What version of PHP is your host running?

Edit: on second thought, it might be an issue with the language strings (actually, I'm positive that's what it is because I forgot to account for that in SMF 1.1.x)... I'll have it fixed in the next version hopefully to be released shortly.

In the mean time, you can make the following change in SimpleSEF.php:

Code (Find) Select
$buffer = preg_replace('~(' . preg_quote($txt['page_created']) . '.*?' . preg_quote($txt['queries']) . ')~', '\1<br />' . $txt['simplesef_adds'] . ' ' . $simpleSEF['execTime'] . $txt['seconds_with'] . $simpleSEF['query_count'] . $txt['queries'], $buffer);

Code (Replace) Select
$buffer = preg_replace('~(' . preg_quote($txt['smf301']) . '.*?' . preg_quote($txt['smf302b']) . ')~', '\1<br />' . $txt['simplesef_adds'] . ' ' . $simpleSEF['execTime'] . $txt['smf302'] . $simpleSEF['query_count'] . $txt['smf302b'], $buffer);
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

iGate

well it has now removed those errors from appearing everywhere. but i get 404 errors. do u know any test which i can use to see if mod_rewrite is enabled?

SlammedDime

You need to put the .htaccess file in your /forum/ directory, not your root directory.  It needs to go in the same place as SSI.php.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

iGate

i solved the problem, seems my mod_rewrite is not enabled. will have to get in contact with host.

Advertisement: