11
disky
Re: Rewriting module URLs
  • 2006/2/12 18:26

  • disky

  • Just popping in

  • Posts: 90

  • Since: 2003/10/31


ReWriteRule /modules /buzau [L]

Should do it

You can also try with a [R] instead of [L]

One of the rewrites the URL like redirect, the other hides it, can't test which one is which at the moment.



12
disky
Re: Rewriting module URLs
  • 2006/2/11 14:58

  • disky

  • Just popping in

  • Posts: 90

  • Since: 2003/10/31


Hi Stelian

Thanks for the link, ill look into later.

Yes you can rename 'modules' to 'xyz' by using mod_rewrite

Take a look at the examples earlier in this thread. There should be some examples on how to do something that is similar to what you want, if not. Post what the URL is now, and how you would like it to be, and i'll try to make a mod_rewrite for you.



13
disky
Re: Rewriting module URLs
  • 2006/2/11 14:08

  • disky

  • Just popping in

  • Posts: 90

  • Since: 2003/10/31


Hi there

I did this (taken from a FAQ pagehttps://xoops.org/modules/smartfaq/faq.php?faqid=362)

The rest of that FAQ i didn't use because it did not suit my need.

FROM FAQ:

We are going to change several tags in the HTML and add a couple more:

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}>" /

From:
body>


To:
body>
noscript> h1><{$xoops_pagetitle}> /h1> /noscript>

From:
img src="<{$xoops_imageurl}>images/logo.gif"
To:
img src="<{$xoops_imageurl}>images/logo.gif" alt="<{$xoops_pagetitle}>"

From:
{$xoops_footer}> |

To:
{$xoops_footer}> | a href="http://www.your-domain-here.com/" target="_self"> <{$xoops_pagetitle}> /a

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 into
http://www.xray-mag.com/article/159/Ferry_sinks_in_Red_Sea_
Because the headline is 'Ferry sinks in red sea'

And of course the mod_rewrite changes i have mentioned earlier in this thread.

Hope this helps.



14
disky
Re: Rewriting module URLs
  • 2006/2/11 8:18

  • disky

  • Just popping in

  • Posts: 90

  • Since: 2003/10/31


Hello Stelian

Simplified URL is that a hack/module for XOOPS ?

If so i don't use it, and rewriting the URL's using mod_rewrite directly has improved on my Search Engine Rating.

I also made sure that that headline for each article is shown in the URL and the page title.

You can see it in function on www.xray-mag.com

/Søren



15
disky
Re: Re: Re: Rewriting module URLs
  • 2006/1/29 9:15

  • disky

  • Just popping in

  • Posts: 90

  • Since: 2003/10/31


Sorry can't help you with that one.

I am sure it is possible, but i just don't know how, sorry.



16
disky
Re: Rewriting module URLs
  • 2006/1/28 23:20

  • disky

  • Just popping in

  • Posts: 90

  • Since: 2003/10/31


I am not to sure about what you mean.

So you have your *.mydomain.com and you want
site1.mydomain.com to point to one website and site2.mydomain.com to point to another website ?

If so just use virtual hosts in apache's config file.

You could have:
<VirtualHost site1.mydomain.com>
ServerName site1.mydomain.com
ServerAlias www.site1.mydomain.com site1.mydomain.com
More lines here
</VirtualHost>

<VirtualHost site2.mydomain.com>
ServerName site2.mydomain.com
ServerAlias www.site2.mydomain.com site2.mydomain.com
More lines here
</VirtualHost>

The serveralias just makes aliases for your site so that www.site1.mydomain.com is the same at site1.mydomain.com


If i miss understood your question, please explain :)



17
disky
Re: Rewriting module URLs
  • 2006/1/24 22:05

  • disky

  • Just popping in

  • Posts: 90

  • Since: 2003/10/31


Hi again :)

I am not sure about the changes to the forum.

But the .htaccess should be something like:

RewriteEngine On
RewriteBase /
RewriteRule ^forum/thread/([0-9]+)$ /index.php?showthread=$1 [L]
RewriteRule ^forum/forum/([0-9]+)$ /index.php?showforum=$1 [L]
RewriteRule ^forum/user/([0-9]+)$ /index.php?showuser=$1 [L]


But i guess that in front of '/index.php' you need a bit more URL to point the the correct directory of your server.

Hope it works, if not just 'complain'



18
disky
Re: Rewriting module URLs
  • 2006/1/19 8:23

  • disky

  • Just popping in

  • Posts: 90

  • Since: 2003/10/31


Hi again

Sorry for the slow answer, i have not figured out how to get xoops.org to send me an email when someone posts in this thread, so sometimes it take some time before i visit the site.

'My next question I guess is, how do (or can) you change it from being domain.com/news/ (with the last slash) to domain.com/news (without the lash)?'

This is easy :)

Instead of:
RewriteRule ^shortcut/$ /modules/veryLongUrl/index.php [L]

use:
RewriteRule ^shortcut$ /modules/veryLongUrl/index.php [L]

the first part after 'RewriteRule '^shortcut$'

Is a regular expression telling mod_rewrite the following:

^ means start of line (which is actually after the part in 'RewriteBase' from earlier in the .htaccess file)
shortcut means look for 'shortcut'
$ means end of line

So mod_rewrite looks for a line containing nothing more than 'shortcut' which with url and everything is 'http://www.mydomain.com/shortcut' where the 'http://www.mydomain.com/' is defined by '/' in the rewritebase part of the .htaccess file.

So when you have a rewrite rule like this:

RewriteRule ^shortcut/$ /modules/veryLongUrl/index.php [L]

It means a line containing 'shortcut/'

If you have:
RewriteRule ^shortcut/.*$ /modules/veryLongUrl/index.php [L]

It means a line starting with 'shortcut/' followed by anything, so these following will work
shortcut/
shortcut/blabla
shortcut/dir1/dir2/dir3/fjfjfkajdhfkljsdfhglsdfg



Hope it makeas a little bit of sence, sort of hard for me to explain (not english by nature)

If not just ask.



19
disky
Re: Rewriting module URLs
  • 2006/1/16 19:59

  • disky

  • Just popping in

  • Posts: 90

  • Since: 2003/10/31


Hi Mikey

I must admit i can't really figure out if your solution will work or not.

But i think the problem you might have is, that NewBB has a problem with the URL's being rewriten, just like Xoops'es core file did have :(

Maybe ask or search on newbb's homepage, somebody might help. Or post a new thread on this site. I have never used newbb so i am not much help there :(



20
disky
Re: Rewriting module URLs
  • 2006/1/14 13:18

  • disky

  • Just popping in

  • Posts: 90

  • Since: 2003/10/31


Sure.

Only place i could find where i could post was in the forum:
http://sourceforge.net/forum/forum.php?thread_id=1420773&forum_id=347994

Hope it helps.




TopTop
« 1 (2) 3 4 5 ... 9 »



Login

Who's Online

213 user(s) are online (112 user(s) are browsing Support Forums)


Members: 0


Guests: 213


more...

Donat-O-Meter

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

Latest GitHub Commits