91
patagon
Re: Rewriting module URLs
  • 2006/5/15 3:01

  • patagon

  • Quite a regular

  • Posts: 235

  • Since: 2002/1/8 0


Hi disky,

i've read this a few times but I'm still stuck, I want to change:

http://www.mysite.com/modules/weblinks/ to
http://www.mysite.com/nombre/

and:
http://www.mysite.com/modules/weblinks/viewcat.php?cid=1
http://www.mysite.com/modules/weblinks/singlelink.php?lid=1

to anything without ? I followed an example here which would work great for me, below is my .htaccess

RewriteEngine On
RewriteBase /

## just a test - this works ##
RewriteRule ^justATest/$ /index.php [L]

## to change modules-weblinks to nombre ##
RewriteRule ^nombre/$ /modules/weblinks/ [L]
RewriteRule ^nombre/category/([0-9]+).html$ /modules/weblinks/viewcat.php?cid=$1 [L]
RewriteRule ^nombre/([0-9]+)$ /modules/weblinks/singlelink.php?lid=$1 [L]

This gives me the following error on http://www.mysite.com/nombre/

Fatal error: Call to undefined function: file_include_weblinks() in /usr/www/users/pamela/a_guia/modules/weblinks/header.php on line 42
Warning [PHP]: main(/usr/www/users/pamela/a_guia/modules/system/include/file_include.php): failed to open stream: No such file or directory in file modules/weblinks/header.php line 41
Warning [PHP]: main(): Failed opening '/usr/www/users/pamela/a_guia/modules/system/include/file_include.php' for inclusion (include_path='.:/usr/local/lib/php') in file modules/weblinks/header.php line 41


any idea what I'm doing wrong?
Thanks

92
disky
Re: Rewriting module URLs
  • 2006/5/15 18:42

  • disky

  • Just popping in

  • Posts: 90

  • Since: 2003/10/31


Cuidiu:
What you need to change in the templates i can't tell you, it depends 100% on what template you use, and how it is built.

What i changed in the article system i uses, is how links are made in the templates i use to list links.

There i took the page title and added it to the URL.

About this '_MD_SF_REQUESTEDANDANSWERED '

Try to do a search in the language folders of the module you use, it sounds like it was not translated to the language you want to use.

About hiring me, it sure depends on what you need. If you really mean it, contact me by personal message :)

93
disky
Re: Rewriting module URLs
  • 2006/5/15 18:47

  • disky

  • Just popping in

  • Posts: 90

  • Since: 2003/10/31


patagon:

Hi there.

It sounds like the weblink module you are using, has a problem with the rewritten URL's.

Could you show me the code around the line it complains about ? maybe the whole function where the error occurs.

I can't garanti to be able to help you though, never used the weblink module.

94
patagon
Re: Rewriting module URLs
  • 2006/5/15 21:21

  • patagon

  • Quite a regular

  • Posts: 235

  • Since: 2002/1/8 0


thanks disky, here is the function (if I guessed what a function is

// include file
include_once $MODULE_ROOT."/include/file_include.php";
file_include_weblinks( $MODULE_DIRNAME, $XOOPS_LANGUAGE );
file_include_system_lang( 'search.php', $XOOPS_LANGUAGE );
file_include_system_lang( 'user.php', $XOOPS_LANGUAGE );

coulndt it be that I'm doing something wrong? 'justatest' works, but I tried modifying modules/article to abc/article and that doesnt work either (I am using the article module by phpbb that also overwrites the urls so that could be an issue).

anyway, hope you understand all this better than me...I really appreciate your help and understand there are no guarantees

95
patagon
Re: Rewriting module URLs
  • 2006/5/15 22:19

  • patagon

  • Quite a regular

  • Posts: 235

  • Since: 2002/1/8 0


well, i managed to modify modules/article/ to name/article, but then I see a very similar error on header.php too. So I guess that confirms modrewrite works on my server but there is something wrong with the modules I'm using? Anyone succeded in doing this with the 'article' module? I remember reading something about it but cant find it now...I havent tried yet with CBB but from reading here no one succeded on that.

96
technigrafa
Re: Rewriting module URLs

Okay, what if you want to rewrite so that any user visiting a particular module, such as liaise, gets https: and not http: and then if they leave liase, they automatically get http: back?

This is close, it makes any non-liase page go back to http:, but it makes my SSL break on liase pages, but only in Firefox:

Options +FollowSymlinks
RewriteEngine On
RewriteCond 
%{HTTPSon [NC]
RewriteRule !^modules/liaise http://%{HTTP_HOST}%{REQUEST_URI} [R,L]


I think it has something to do with the images referred to in the CSS of the theme? I tried hard coding all those to https, but that doesn't help.


So I tried this:
Options +FollowSymlinks
RewriteEngine On
RewriteCond 
%{HTTPSon [NC]
RewriteRule !^/*(^modules/liaise|^themes/themename) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]


Hoping to include anything in the themes folder as well as the liaise folder, but no joy. Still broken lock icon in Firefox Anyone know what I'm doing wrong here?


**Edited*/

97
tom_taylor
Re: Rewriting module URLs
  • 2006/8/17 22:21

  • tom_taylor

  • Just popping in

  • Posts: 5

  • Since: 2006/3/19


we not combine all the hard work from this thread into the Simplified URLs Hack?

Everyone wants these functions, why not bring it all together? ;)

Login

Who's Online

419 user(s) are online (314 user(s) are browsing Support Forums)


Members: 1


Guests: 418


Runeher2,

more...

Donat-O-Meter

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

Latest GitHub Commits