41
kenogui
Re: Apache mod_rewrite RewriteRule Success
  • 2004/2/19 7:30

  • kenogui

  • Just popping in

  • Posts: 25

  • Since: 2004/1/19


Yes indeed I wrote a working hack for this.

Is much more than only a friendly Urls generator, it's complete rewrite by PHP regular expression and then an Apache translation.

It's based on the google tap for phpnuke which is perfectly working.

I found many troubles in the "short url" hack previously released, and I don't like the manner it's done, so I decided to rewrite GT for xoops.

My hack supports:
- news
- mylinks
- mydownloads
- contact
- liens
- xoopspoll
- ipbm

It's really easy to add new rewrite rules in my code, and you can easily add your needed modules.

I will update the hack asap, with newBB and other usefull modules ... I only need to find most populars ones ...

42
carnuke
Re: Apache mod_rewrite RewriteRule Success
  • 2004/2/26 16:46

  • carnuke

  • Home away from home

  • Posts: 1955

  • Since: 2003/11/5


I thinking of another way to implement the short URLs hack. Currently the hack works on selected modules that are included within the code. This is obviously restricting as new modules come on line. An alternative way (May I suggest) is that the hack is used in conjunction with an "agent" module, one that has a sole purpose of reading and listing all URLs generated by any other module. This is already available as a Site map module. I am looking at a XOOPS sitemap module at the moment by DIGITALPIXEL (xoops germany) I don't know if it automatically generates addresses or if pages within a module need to be selected in order to be displayed. Anyway, the point is that if the short URL hack worked with the Site map module then the user would have greater control over the scope of robot indexing for the site. I know kenogui and Reynaldo both have scripts for this short URL hack so, What do you think of the idea?

Richard

43
sunsnapper
Re: Apache mod_rewrite RewriteRule Success

For me, I like the idea of just letting mod_rewrite handle things as much as possible, to keep the overhead burden on Apache (where it is handled easily).

With that in mind, I think the primary issue is that some module templates make it easy to change URLs in the template itself, while others make calls to the module for a URL in a way that is not easy to modify in the template.

Hopefully, as time goes on, module templates will include URL paths that are easy to edit. Then scripts to handle URLs would not be needed outside of mod_rewrite.

Ot, at least that is my take on it.

44
chapi
Re: Apache mod_rewrite RewriteRule Success
  • 2004/7/9 19:39

  • chapi

  • Theme Designer

  • Posts: 611

  • Since: 2002/1/22


I also tried this mod_rewrite thing today and I have a little problem I think. I'm using only one rewrite rule at the moment.

RewriteRule ^contact(.*)$ /modules/contact$[L]


So when I call nowhttp://www.mydomain.com/contact it showshttp://www.mydomain/modules/contact

But why is there a redirect in it? I thought it should stay athttp://www.mydomain.com/contact and not show the real URL.

Can anyone give me a hint about that? Maybe some misconfiguration on my server?

45
reganjcunlif
Re: Apache mod_rewrite RewriteRule Success

I am trying to rewrite the URL from module/news/ to sitetopic/news/ but am having some difficulty figuring it out. 5 hours on and I'm no better off. :( Any help, greatly appreciated.

Login

Who's Online

193 user(s) are online (120 user(s) are browsing Support Forums)


Members: 0


Guests: 193


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