Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 12172
Latest: LeaMoeller
New This Month: 14
New This Week: 1
New Today: 1
Stats
Total Posts: 39049
Total Topics: 6874
Most Online Today: 59
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 1
Guests: 26
Total: 27

Author Topic: htaccess redirect question  (Read 153 times)

0 Members and 1 Guest are viewing this topic.

Offline shuban

  • Hero Member
  • *****
  • Posts: 637
    • View Profile
    • Biology Forums - For All Your Science Needs
htaccess redirect question
« on: July 25, 2018, 01:47:29 pm »
I'd like to redirect all my topics (only) to another url. I tried the following, but it didn't work

RewriteEngine On
RewriteRule ^/?topic/([^/d]+)/?$ https://NEWURL.com/index.php?topic=$1 [R=301,L]

Offline shuban

  • Hero Member
  • *****
  • Posts: 637
    • View Profile
    • Biology Forums - For All Your Science Needs
Re: htaccess redirect question
« Reply #1 on: July 25, 2018, 01:57:16 pm »
Also tried:

RewriteRule ^(.*)https:\/\/OLD\.com\/index.php\?topic=(.*)$ https://NEW.com/index.php?topic=$2 [R=301,L]

Didn't work

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 14551
    • View Profile
Re: htaccess redirect question
« Reply #2 on: July 25, 2018, 01:58:16 pm »
I would make sure ? is escaped in the first part
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline shuban

  • Hero Member
  • *****
  • Posts: 637
    • View Profile
    • Biology Forums - For All Your Science Needs
Re: htaccess redirect question
« Reply #3 on: July 25, 2018, 02:03:47 pm »
https://regex101.com/r/o8Obr8/1

Tried the following, still don't know.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 14551
    • View Profile
Re: htaccess redirect question
« Reply #4 on: July 25, 2018, 02:06:11 pm »
does your topic url look like http://site.com/?topic/877/
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline shuban

  • Hero Member
  • *****
  • Posts: 637
    • View Profile
    • Biology Forums - For All Your Science Needs
Re: htaccess redirect question
« Reply #5 on: July 25, 2018, 02:07:45 pm »

Offline shuban

  • Hero Member
  • *****
  • Posts: 637
    • View Profile
    • Biology Forums - For All Your Science Needs
Re: htaccess redirect question
« Reply #6 on: July 25, 2018, 03:03:24 pm »
Also tried:

RewriteEngine On
RewriteBase /
RewriteRule \/index\.php\?topic=(.*) https://biology-forums.com$1

But still didn't work.

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
3116 Views
Last post December 26, 2007, 06:09:47 pm
by RWL
2 Replies
3960 Views
Last post March 27, 2008, 06:16:27 pm
by skip
0 Replies
2016 Views
Last post May 21, 2009, 11:48:42 am
by CypheR
1 Replies
1428 Views
Last post June 29, 2012, 09:52:25 am
by SMFHacks
1 Replies
1544 Views
Last post April 26, 2017, 10:29:51 am
by nend

+- Recent Topics

link for users gallery from profile page by SMFHacks
August 20, 2018, 02:40:58 pm

[Mod]Tidy Child Boards 2.0 by SMFHacks
August 20, 2018, 01:32:43 pm

Admin View in Member's Profile of Dates for Accepting of PP and Reg Agreement by SMFHacks
August 18, 2018, 12:03:07 pm

Gallery2 Template Loading Error by SMFHacks
August 18, 2018, 12:02:12 pm

8: Undefined index: description by SMFHacks
August 17, 2018, 01:42:08 pm

It just does not send by SMFHacks
August 16, 2018, 11:03:06 pm

Ad beginning of post by SMFHacks
August 16, 2018, 10:22:58 pm

Agreement Date says NEVER by SMFHacks
August 14, 2018, 04:46:48 pm

HashTags system for SMF 2.0 released by Diego Andrés
August 12, 2018, 02:04:24 pm

Can the Store produce a unique code that you can sell? by SMFHacks
August 11, 2018, 11:43:32 am

Powered by EzPortal