xoops forums

sarahmx

Quite a regular
Posted on: 10/6 22:43
sarahmx
sarahmx (Show more)
Quite a regular
Posts: 381
Since: 2007/10/28
#1

Htaccess redirect and publisher module

Hi

I have a publisher with seo installed in my xoops site 2.5.10 with htaccess seo activated

RewriteRule ^publisher.([a-z]+).([0-9.]+)/  modules/publisher/index.php?seoOp=$1&seoArg=$2

My publisher article url look like this
https://mydomain.com/modules/publisher/item.php?itemid=2  
https://mydomain.com/publisher.item.2/intro.html


i have cloned the publisher module to be services module and i have copy all my publisher content to the services modules..i use the same setting

https://mydomain.com/modules/services/item.php?itemid=2
https://mydomain.com/services.item.2/intro.html


My question is how do i redirect with htaccess all publisher module article to the new service module article..all have same article id..only the module name changed..

thank you

Mamba

Moderator
Posted on: 10/6 23:36
Mamba
Mamba (Show more)
Moderator
Posts: 11172
Since: 2004/4/23
#2

Re: Htaccess redirect and publisher module

If I understand you correctly, you want to forward a link like this:

https://mydomain.com/publisher.item.2/intro.html


to
https://mydomain.com/modules/services/item.php?itemid=2


Then maybe try this:

RewriteRule ^publisher.([a-z]+).([0-9.]+)/  modules/services/index.php?seoOp=$1&seoArg=$2
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

sarahmx

Quite a regular
Posted on: 10/7 9:15
sarahmx
sarahmx (Show more)
Quite a regular
Posts: 381
Since: 2007/10/28
#3

Re: Htaccess redirect and publisher module

Hi Mamba its not working..ive tried that before...by the way i noticed there are missing slashes in our htaccess code when posting in this forum

Im actually trying to redirect three types of publisher url

https://mydomain.com/modules/publisher/
to
https
://mydomain.com/modules/services/



https://mydomain.com/modules/publisher/item.php?itemid=2  
to
https
://mydomain.com/modules/services/item.php?itemid=2


https://mydomain.com/publisher.item.2/intro.html 
to
https
://mydomain.com/services.item.2/intro.html

Mamba

Moderator
Posted on: 10/7 14:01
Mamba
Mamba (Show more)
Moderator
Posts: 11172
Since: 2004/4/23
#4

Re: Htaccess redirect and publisher module

Then maybe this will work?

RewriteRule ^(.*)publisher(.*)  $1services$2


According to this testing tool, it seems to be working
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

sarahmx

Quite a regular
Posted on: 10/7 21:14
sarahmx
sarahmx (Show more)
Quite a regular
Posts: 381
Since: 2007/10/28
#5

Re: Htaccess redirect and publisher module

Thank you very much Mamba....all is working now

Mamba

Moderator
Posted on: 10/7 21:59
Mamba
Mamba (Show more)
Moderator
Posts: 11172
Since: 2004/4/23
#6

Re: Htaccess redirect and publisher module

I'm happy to hear it!
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs