1
nmshah
smartsection 2.13 and wishcraft rewrite hack error
  • 2008/11/5 8:23

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


When i try to use the url rewrite hack as given here https://xoops.org/modules/mediawiki/index.php/.htaccess_%26_smartsection by wishcraft with smartsection module 2.13 in XOOPS 2.3.1 i get a blank page on clicking on any category. With debug on I get the following error.

Fatal error: Call to a member function notLoaded() on a non-object in /home2/nmshah/public_html/modules/smartsection/category.php on line 37
All errors (1) queries (7) blocks (0) extra (0) timers (3)
Errors
Notice: Only variable references should be returned by reference in file /modules/smartsection/class/category.php line 432

And when i try to click any article the redirection msg i get is you have clicked an invalid article.

system overview
XOOPS Version - XOOPS 2.3.1
PHP Version - 5.2.5
MySQL Version - 5.0.51a-community
Server API Version - cgi
OS Version - Linux

safe_mode - Off
register_globals - Off
magic_quotes_gpc - On
allow_url_fopen - On
fsockopen - On
allow_call_time_pass_reference - On
post_max_size - 100M
max_input_time - 60
output_buffering -
max_execution_time - 30
memory_limit - 32M
file_uploads - On
upload_max_filesize - 100M

Pls help

2
dslchart
Re: smartsection 2.13 and wishcraft rewrite hack error
  • 2008/11/5 8:45

  • dslchart

  • Not too shy to talk

  • Posts: 112

  • Since: 2008/9/7 1


smartsection has an own seo hack included. you dont must included the .htaccess hack for this module.

3
nmshah
Re: smartsection 2.13 and wishcraft rewrite hack error
  • 2008/11/5 9:30

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


the reason i am using the wishcraft style is because using seo hack included in smartsection creates duplicate content problem as the content is available with both the old as well as the new seo url. I have already mentioned this in some other thread and asked for a solution for this but since i have not got any answers i am assumnig there is no solution for it as yet and hence am looking for an alternative way to use seo in smartsection.

4
nmshah
Re: smartsection 2.13 and wishcraft rewrite hack error
  • 2008/11/5 11:51

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


I have tried to merge the two approaches of wishcraft and the one included in the smartsection module. What i have done is followed the instructions given in the smartsection module using rewrite as option to make seo friendly urls. Then i used the code from wishcrafts hack only in the index.php file of the module. finally i added the foloowing lines to the .htaccess file again 1st part of the code is as it is from the smartsection instructions and the second part from the code as given by wishcraft.

So the .htaccess file reads as follow

RewriteEngine On

Quote:
RewriteRule ^smartsection/ modules/smartsection/index.php [L,NC,QSA] /**second last line from .htaccess code given by wishcraft, changed articles to smartsection */
RewriteRule ^smartsection\.([a-z]+)\.([0-9.]+)/ modules/smartsection/seo.php?seoOp=$1&seoArg=$2 /** from smartsection module seo instructions */


finally added the following lines to robots.txt file

Quote:
Disallow /modules/smartsection/


Net result all links inside the smartsection module are seo links. The index page for smartsection module in redirected tohttp://yoursitename.com/smartsection

And even though the old links still exist the robots.txt file ensures that google and other search engines neglect the old links.

I have no knowledge of htaccess or url-rewrite whatsoever. This is just a trail and error approach which seems to be working.

I need to know is this approach fine to use the seo url in smartsection and still not getting penalised for duplicate content.

Also the sitemap module still shows the non seo url. So is there a way to redirect the old urls to new seo urls like its done in the wishcraft way

5
nmshah
Re: smartsection 2.13 and wishcraft rewrite hack error
  • 2008/11/7 22:34

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


pls help

Login

Who's Online

173 user(s) are online (69 user(s) are browsing Support Forums)


Members: 0


Guests: 173


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits