71
stelian
Re: Rewriting module URLs
  • 2006/3/7 14:18

  • stelian

  • Just popping in

  • Posts: 87

  • Since: 2005/12/17


Ryansaw - take a look athttp://www.buzaulive.ro/buzau/forum/viewtopic.php?topic_id=13&forum=4
(an example from my cbb forum) an tell me if this is exactly what you want.

The subject is the page name ;)

72
hawkeyegop
Re: Rewriting module URLs
  • 2006/4/2 23:53

  • hawkeyegop

  • Just popping in

  • Posts: 83

  • Since: 2004/9/18


OK, this isn't totally working for me so far.

Here is what I have in my .htaccess file:

RewriteEngine On
RewriteBase 
/

ReWriteRule ^contact/$ /modules/liaise [L]


Now when I go to mysite.com/contact/ it takes me to the correct page, except that the URL in my browser address bar still shows mysite.com/modules/liaise, and the link in the menu still also shows mysite.com/modules/liaise

Thanks for any help with this.

73
stelian
Re: Rewriting module URLs
  • 2006/4/7 22:54

  • stelian

  • Just popping in

  • Posts: 87

  • Since: 2005/12/17


hawkeyegop, here is what you have to do.

Regards.

74
hawkeyegop
Re: Rewriting module URLs
  • 2006/4/10 2:29

  • hawkeyegop

  • Just popping in

  • Posts: 83

  • Since: 2004/9/18


that doesn't do anything except change modules to md. that's not what i'm trying to do.

75
Northern
Re: Rewriting module URLs
  • 2006/4/10 6:25

  • Northern

  • Just can't stay away

  • Posts: 420

  • Since: 2004/12/26


did you read the posts?
did you check the links?
did you read the derections?

it does more then make "modules" turn into "md"
that was a example.

heres another.
i just made a sample site for someone on the x-php mod.
heres the mod if you would have had it.

http://www.northernneons.com/x27/modules/pbboard/

and now heres the same placce with the rewrite added to it.

http://www.northernneons.com/x27/forums/

76
hawkeyegop
Re: Rewriting module URLs
  • 2006/4/11 16:09

  • hawkeyegop

  • Just popping in

  • Posts: 83

  • Since: 2004/9/18


Northern: I have read through all of the posts in this thread, all 8 pages of them. In fact, I have read through twice.

And yes, the solution from Stelian does only change the word "module" to "md"

77
stelian
Re: Rewriting module URLs
  • 2006/4/11 16:51

  • stelian

  • Just popping in

  • Posts: 87

  • Since: 2005/12/17


@ hawkeyegop please visit my site. If you will see any URL with the module name or something I will delete my site. :) (yo have the site in my signature) If you can't read from peak.ne.jp you can use www.google.com/translate_t to translate from japanese to english.
You have to add some code lines to mainfile.php and to edit your .httaccess.
If you have any questions please ask. Also, you can contact me by yahoo messenger and I will try to help you.
My site is runing 2.0.13.2

Best regards,
Stelian.

78
prvmao
Re: Rewriting module URLs
  • 2006/4/14 12:43

  • prvmao

  • Just popping in

  • Posts: 34

  • Since: 2006/2/16


i tryed this hacks and works but i have some path problems...
so .htaccess

RewriteEngine on
RewriteBase /
RewriteRule ^romania/anunturi-online-gratuite/(.*)$ modules/myAds/$1 [L]



and in mainfile.php added
$GLOBALS['_rewriteRulesFrom'] = array(
'/romania/anunturi-online-gratuite/',
);

$GLOBALS['_rewriteRulesTo'] = array(
'/modules/myAds/',
);
function newbb_changer( $nb )
{
return str_replace(XOOPS_URL.'/modules/myAds/' , XOOPS_URL.'/romania/anunturi-online-gratuite/', $nb) ;
}
ob_start( 'newbb_changer' ) ;

The hack works but take a look

here
_CLA_ADDFROM Babiloon
_CLA_ACTUALY 28 _CLA_ANNONCES _CLA_INCAT 49 _CLA_CAT2
_CLA_THE 10 _CLA_LASTADD
_CLA_TITLE _CLA_PRICE _CLA_DATE _CLA_LOCAL2 _CLA_PHOTO


how can i fix this ?

And if I aply this to weblinks modules it show one empty page

79
tom0360
Re: Rewriting module URLs
  • 2006/4/20 23:00

  • tom0360

  • Just popping in

  • Posts: 12

  • Since: 2006/4/16


Is it possible to accomplish a rewrite if XOOPS is not installed in the root directory?

I have XOOPS installed athttp://www.justhotdeals.net/games, at the moment. I was attempting to create a gaming download/online review site.

I am a little concerned that the search engines won't crawl that part of my site and would like to make the links a bit more search engine friendly.

I tried the shorturl mods with no luck and the info found here about the .htaccess file. I am not sure if I need to change anything to get it to work in the /games directory or if it will even work at all.


Thanks for any help or advice.

Tom

80
Cuidiu
Re: Rewriting module URLs
  • 2006/5/12 20:42

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


I've almost got it! Close but not quite. I'm trying to rewrite modules/smartfaqs/ to faqs/ so that if it's an faq it would show up as:
mydomain.com/faqs/faqpagetitle.html
and categories would show up as
mydomain.com/faqs/category/category-name/ or /faqs/category/name/ would be fine.
So far I've taken these steps - I did this:
Quote:
So change (please note I have removed opening and closing "<" and ">" from the statements so this renders in HTML, you will need to fix the tags:

From: meta name="keywords" content="<{$xoops_meta_keywords}>" /
To: meta name="keywords" content="<{$xoops_pagetitle}>, <{$xoops_meta_keywords}>" /

From: meta name="description" content="<{$xoops_meta_description}>" /
To: meta name="description" content="<{$xoops_pagetitle}>, <{$xoops_meta_description}>" /

But the next one I did not know how to do. Should I change the templates in each module? If so, where in the template? If only in a theme template, where in that template? I apologize if this should be obvious but I'm totally stumped at the moment.

Quote:
FROM FAQ END: Then on every relevant pagetemplate i took the title of a webpage and added it to the URL.

So that:http://www.xray-mag.com/article/159
Turns intohttp://www.xray-mag.com/article/159/Ferry_sinks_in_Red_Sea_
Because the headline is 'Ferry sinks in red sea'

I did this (but wrong I'm sure! see below):
Quote:
And of course the mod_rewrite changes i have mentioned earlier in this thread.

And I changed the line in common php.

It's partially working here though I'm doing it incorrectly. This is what I added to .htaccess:
RewriteEngine On
RewriteBase /
RewriteRule ^faqs/$ /modules/smartfaq/ [L]
RewriteRule ^faqs/category/([0-9]+).html$ /modules/smartfaq/category.php?categoryid=$1 [L]
RewriteRule ^faqs/([0-9]+)$ /modules/smartfaq/faq.php?faqid=$1 [L]

Here's what's working:
directory - domain.com/faqs/
category - domain.com/faqs/category/1.html
individual faq - domain.com/faqs/1

But I would like them to be the pagename and category name.
Can someone please help? Can someone point out what I'm doing wrong?

Thanks in advance.
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

Login

Who's Online

104 user(s) are online (67 user(s) are browsing Support Forums)


Members: 0


Guests: 104


more...

Donat-O-Meter

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

Latest GitHub Commits