News:

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

Main Menu

Pretty URLs

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

Previous topic - Next topic

bostonb

thanks for the nice reply, Ryan


how do the default themes do for SEO? if they fail at it, is there a guide anywhere to some quick modifications that would fix the default or classic themes?

Dannii

Quote from: Arkangel on June 25, 2009, 03:17:21 AM
topic answer error:

       
do not display images in response topic .. even when I quote
Please give me a URL for this page.

Quote from: ScopeXL on June 25, 2009, 03:21:45 AM
Ok Danni, i guess the option left now is to write the file out by hand again.
Do i have to include the codes added by the pretty url mod?

2 - the original codes inside the .htaccess file was about 3 lines of short codes. though i dont remember it but it was something like "allow/deny and some strings like / or \"
i will b happy if someone write that out for me or do you know if my host can recall that?
It's possibly your host might have a backup, they often do weekly offsite backups. Won't hurt to ask. Put it before this mod's section and it won't be overwritten anymore.

Sorry for this. I think I will change the mod so that it backs up the pre install .htaccess differently from when it backs up its own changes.

Bruno36, well that's unfortunate. You could either try figuring out how the mod works yourself, or ask someone else too. I don't really have enough time to fix other broken mods.

ryanhellyer, good post. I also endorse Eren's themes.

Quote from: Rajasekharan on June 25, 2009, 08:56:05 AM
1.) I have the a WordPress blog installed in the subfolder 'blog.'
2.) I have the SMF version 1.1.9 installed in the subfolder 'forum.'
3.) Wordpress is working fine as far as redirect to non-www, traling slash and stripping index.php are concerned with htaccess code.
4.) I have pretryurl working for forum.
The url for blog is http://example.com/article-name/
The url for forum is http://example.com/forum/board-name/article-name/

Now my problems:

1.) What htaccess code needs to be added for the forum to be redirected to non-www url (either in the root htaccess code or in the subfolder)?
2.) What htaccess code needs to be added for the forum to add a trailing slash in the browser if it's missing (in the root htaccess code or in the subfolder htaccess code)?
3.) What htaccess code needs to be added for the forum to strip the index.php from url?
I don't know, and I kind of feel like saying just figure it out yourself!
But for 1, it's probably the same as for wordpress. As for 2 and 3, they don't matter. Who cares? You shouldn't.

bostonb, they fail completely. The new theme in RC2 will most likely also suck a lot. You can't fix it, you need to start from scratch (which is why the new default will also suck.) I suggest using and modifying one of Eren's themes.
"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."

ScopeXL

Quote from: ScopeXL on June 25, 2009, 03:21:45 AM
I installed this and everything said it installed fine, however when it redirects me after install it tells me "install_template could not be loaded" And I see no admin options for it. How can this be fixed? I'm running SMF 1.1.9

Hey Dannii I see you quoted me, or attempted too it looked like in your previous message. Still looking for options to solve this. I have 0.9.3 working on it and attempted to revert back and now it won't install properly, and since 0.9.3 has no maual instructions from SMF anymore, I'm sort of stuck not using this mod which I greatly need. Any help would be fantastic.

Rajasekharan

Thank you Dannii for the prompt reply.

The htaccess code by WordPress for www or non-www redirect works only for the urls generated by WordPress where as the forum can be accessed by with www and without www.

Moreover, the search engines care problems 2 and 3.  My forum can be accessed with example.com/forum/ and example.com/forum/index.php.  Same is the case with and without trailing slash.  All leading to duplicate contents.

Any workout or options possible in the future releases of PrettyURLs?

Dannii

Quote from: ScopeXL on June 25, 2009, 09:52:11 PM
Quote from: ScopeXL on June 25, 2009, 03:21:45 AM
I installed this and everything said it installed fine, however when it redirects me after install it tells me "install_template could not be loaded" And I see no admin options for it. How can this be fixed? I'm running SMF 1.1.9

Hey Dannii I see you quoted me, or attempted too it looked like in your previous message. Still looking for options to solve this. I have 0.9.3 working on it and attempted to revert back and now it won't install properly, and since 0.9.3 has no maual instructions from SMF anymore, I'm sort of stuck not using this mod which I greatly need. Any help would be fantastic.
You can get 0.9.3 at the google code site. If you open the archive you can then see the xml files themselves, and follow their instructions. Or... upload the 0.9.3 package to the package parser.

Quote from: Rajasekharan on June 25, 2009, 11:56:30 PM
Thank you Dannii for the prompt reply.

The htaccess code by WordPress for www or non-www redirect works only for the urls generated by WordPress where as the forum can be accessed by with www and without www.

Moreover, the search engines care problems 2 and 3.  My forum can be accessed with example.com/forum/ and example.com/forum/index.php.  Same is the case with and without trailing slash.  All leading to duplicate contents.

Any workout or options possible in the future releases of PrettyURLs?
Maybe your best option would be to backport/make your own canonical support from SMF RC2. Or just wait for it to be released, hopefully won't be too long.
"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."

mic_comte

 Hello,
I use pretty url on my forum, it works well (I just had to add the RewriteBase "/" line).

But now I would like one more address to be rename:
mydomain.com/index.php?action=forum
should be:
mydomain.com/forum/

So I have added the word forum in the following line of .htaccess:
RewriteRule ^(dumpdb|editpoll|editpoll2|featuresettings|featuresettings2|findmember|forum|help|helpadmin)/?$ ./index.php?pretty;action=$1 [L,QSA]


But it doesn't seem to be enough.

Any idea?

ryanhellyer

#3966
Quote from: bostonb on June 25, 2009, 06:32:54 PM
thanks for the nice reply, Ryan
No problem.

Quote from: bostonb on June 25, 2009, 06:32:54 PMhow do the default themes do for SEO?

They couldn't be much worse if they tried. I'm not going to comment on Curve though as it isn't finished yet.

Quote from: bostonb on June 25, 2009, 06:32:54 PM
if they fail at it, is there a guide anywhere to some quick modifications that would fix the default or classic themes?

Quick modifications? No, that is not possible. I suggest recoding a theme from scratch, that's what I did (see my signature for the link). Coding a full SMF theme is one hell of a task though and not something to be taken lightly. There's a lot of code in there which needs written and need to know a lot about HTML/CSS to do it. It's much easier to take one of Eren's themes and rejig it a bit to look how you want. Unfortunately Eren is not developing SMF themes anymore :(



In a nutshell, SMF is not that good for SEO unless you want to spend a lot of time coding a theme from scratch (or rejigging one of Eren's), installing MOD's like Danni's and generally spending a lot of time developing your forum. bbPress has far superior SEO features straight out of the box than any other forum software available ... unfortunately it has almost no extra features so you need to spend a ridiculous amount of time adding extra stuff that SMF has built in. I'm working on a new project for bbPress which may fix a lot of these problems, but in the mean time I'm happy plodding along using SMF with a scratch built theme. It seems to be the best solution for me at this time.


Rajasekharan

Ok I solved these problems. Here are the solutions:

Problem 1.  Added the following code to htaccess file in the subfolder 'forum.'

# Rewrite rule for redirecting www to non.www
RewriteEngine On
RewriteCond %{HTTP_HOST}//s%{HTTPS} ^www\.(.*)//((s)on|s.*)$ [NC]
RewriteRule ^ http%3://%1%{REQUEST_URI} [L,R=301]



Problem 2.  Added the following code to htaccess file in the subfolder 'forum.'

# Rewrite rule for adding a trailing slash
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule ^(.*)$ $1/ [L,R=301]


Problem 3. Opened the index.template.php of the theme and made alterations in the link there for the home button.


<a' , $current_action=='home' ? ' class="current"' : '' , ' href="http://example.com/forum/"><span>Home</span></a>&nbsp;|';


However, still index.php exists in link tree!  Don't know how to fix that. Hope I could google it out.

Rajasekharan

Dannii just another question to you:

PrettyURL is not returning a 404 error page for absurd URLs.  Do you suggest any fix for this?

trashgeek

Im about to cut myself...

i just installed this mod and then I activate it from the control panel next thing I see is nothing... all mi board its plain white, i was usung 1.1.9

if i check the source code on index it only shows this

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8"></HEAD>
<BODY></BODY></HTML>


Theres no action i can do, its all white... i dont know whats happening or if theres any way to fix it, please can someone help!!!!   :'( :'( :'( :'(

Arkangel

   
when editing the title does not change the url to resolve this?

ScopeXL

@trashgeek: I had this happen to me as well, go through the package parser and remove all pretty url code and put back to SMF code, it will fix your issue.

@Dannii: I managed to get 1.0RC installed, but no admin option comes up in my admin area. The screenshot below shows you where I think Pretty URLs is supposed to be. Also, when I try to manage my boards the screen goes white. Maybe this has something to do with the thing I get saying "install_template could not be loaded" when the package first installs? Let me know.


Dannii

Quote from: Rajasekharan on June 26, 2009, 11:35:07 AM
Dannii just another question to you:

PrettyURL is not returning a 404 error page for absurd URLs.  Do you suggest any fix for this?
It assumes that anything like that is a board that doesn't exist. So change the code to have 404s when you access a board that doesn't exist.

Quote from: trashgeek on June 26, 2009, 12:28:45 PM
Im about to cut myself...

i just installed this mod and then I activate it from the control panel next thing I see is nothing... all mi board its plain white, i was usung 1.1.9

if i check the source code on index it only shows this

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8"></HEAD>
<BODY></BODY></HTML>


Theres no action i can do, its all white... i dont know whats happening or if theres any way to fix it, please can someone help!!!!   :'( :'( :'( :'(

Follow the first section of the trouble shooting page! Did the test page work?

Quote from: Arkangel on June 26, 2009, 02:05:33 PM
   
when editing the title does not change the url to resolve this?
Edit the rows in pretty_topic_urls and empty the cache.

Quote from: ScopeXL on June 26, 2009, 03:48:21 PM
@trashgeek: I had this happen to me as well, go through the package parser and remove all pretty url code and put back to SMF code, it will fix your issue.

@Dannii: I managed to get 1.0RC installed, but no admin option comes up in my admin area. The screenshot below shows you where I think Pretty URLs is supposed to be. Also, when I try to manage my boards the screen goes white. Maybe this has something to do with the thing I get saying "install_template could not be loaded" when the package first installs? Let me know.


The files haven't been installed and copied correctly then.
"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."

Qayyom Ashraf

I installed the MOD, It is working perfectly  :D

But during Installation of this mod it shows error in ./Sources/News.php I tried to edit it manually, but I was unable..., because I am not a programmer Please do the needful and edit my attached News.php file, then I'll upload/replace the original file.

waiting early and positive response from all experts.

Thanks & Regards!
Qayyom Ashraf  |  Karachi-PK |::.www.JangForum.Com.::|

Rajasekharan

QuoteSo change the code to have 404s when you access a board that doesn't exist.

Dannii, kindly let me know how to change the code to have a 404.

vividwarior

I installed it and it gives error for querystrig but I installed it. Now I am getting this error in my admin panel

"Apply Filter: Only show the errors with the same message
8: Undefined index: query_string
File: /home/electric/public_html/urdufans.com/Sources/Display.php
Line: 81"

while prettyurl is working very well for profiles (I want it only for profiles).


What can I do to solve this error? When I tried to uninstall it, it gives the same error of querystrig.  :'( :'( :'( :'( :'(

Dannii

Quote from: qayyom on June 27, 2009, 02:14:16 AM
I installed the MOD, It is working perfectly  :D

But during Installation of this mod it shows error in ./Sources/News.php I tried to edit it manually, but I was unable..., because I am not a programmer Please do the needful and edit my attached News.php file, then I'll upload/replace the original file.

waiting early and positive response from all experts.

Thanks & Regards!
It's really quite easy. Go to the manual install instructions on the mod page. Just search and replace. If you can't do it I'll look at it next week.

Quote from: Rajasekharan on June 27, 2009, 05:38:56 AM
QuoteSo change the code to have 404s when you access a board that doesn't exist.

Dannii, kindly let me know how to change the code to have a 404.
I don't really know, you'll have to find it. Check in Load.php and MessageIndex.php.

Quote from: HDsoza on June 27, 2009, 06:41:18 AM
I installed it and it gives error for querystrig but I installed it. Now I am getting this error in my admin panel

"Apply Filter: Only show the errors with the same message
8: Undefined index: query_string
File: /home/electric/public_html/urdufans.com/Sources/Display.php
Line: 81"

while prettyurl is working very well for profiles (I want it only for profiles).


What can I do to solve this error? When I tried to uninstall it, it gives the same error of querystrig.  :'( :'( :'( :'( :'(
1.0RC doesn't have these errors, so upgrade if you haven't yet.
"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."

ScopeXL

Ok, I have manually installe Pretty URLs 1.0RC and it installed great. One thing it did not do is put a link in my admin area to for the administrative options. What is the code in the install package to get that specific area? I know for a fact all files have the correct Pretty URLs modifications, and it looks like it just adds a <br /> to my Configuration menu in the admin area where the admin links should be. Any insights?

mkress

so, is there someone who can help  me to get pretty urls for category view mod:
http://www.simplemachines.org/community/index.php?topic=146969.msg2120760#msg2120760

???

Dannii

Quote from: ScopeXL on June 27, 2009, 11:28:11 AM
Ok, I have manually installe Pretty URLs 1.0RC and it installed great. One thing it did not do is put a link in my admin area to for the administrative options. What is the code in the install package to get that specific area? I know for a fact all files have the correct Pretty URLs modifications, and it looks like it just adds a <br /> to my Configuration menu in the admin area where the admin links should be. Any insights?
The latest 1.0RC package should ensure the admin menu option will always be there. Which version of SMF do you have? Check Sources.xml for the changes.

fca07, does the view single category let you use category names, or only category numbers? You'll probably have to change that code a lot if it only lets you use numbers.
"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: