1
sarahmx
Htaccess redirect and publisher module
  • 2021/10/6 22:43

  • sarahmx

  • Quite a regular

  • Posts: 381

  • Since: 2007/10/28


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

2
Mamba
Re: Htaccess redirect and publisher module
  • 2021/10/6 23:36

  • Mamba

  • Moderator

  • Posts: 11264

  • Since: 2004/4/23


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

3
sarahmx
Re: Htaccess redirect and publisher module
  • 2021/10/7 9:15

  • sarahmx

  • Quite a regular

  • Posts: 381

  • Since: 2007/10/28


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

4
Mamba
Re: Htaccess redirect and publisher module
  • 2021/10/7 14:01

  • Mamba

  • Moderator

  • Posts: 11264

  • Since: 2004/4/23


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

5
sarahmx
Re: Htaccess redirect and publisher module
  • 2021/10/7 21:14

  • sarahmx

  • Quite a regular

  • Posts: 381

  • Since: 2007/10/28


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

6
Mamba
Re: Htaccess redirect and publisher module
  • 2021/10/7 21:59

  • Mamba

  • Moderator

  • Posts: 11264

  • Since: 2004/4/23


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

Login

Who's Online

34 user(s) are online (19 user(s) are browsing Support Forums)


Members: 0


Guests: 34


more...

Donat-O-Meter

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

Latest GitHub Commits