Advertise Your Business With Us At Cheap Price, Call Or WhatsApp +2349021020979


[-]
Tags
experts can url i how htaccess redirect

Hi Guest, kindly Login Or Register To Unlock More Advanced Features In Wapforum


Htaccess Experts How Can I Redirect Url
(3.3k )
#1
Hello, I need help in htaccess. I don't really like htaccess. I presume some of us must be good in it.

I want a situation when I visit http://example.com/1/hhh which gets it's content from http://example.com/index.php?topic=1.

It will redirect to http://example.com/2/hhh (another topic)

it worked but it is adding the URL it gets its content from after redirecting.

http://example.com/2/hhh/?topic=1

I need the ?topic=1 out as this will cause duplicate content in Google.

Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]



Redirect 301 /1/hhh /2/hhh

RewriteRule ^([0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?topic=$1.0
</IfModule>


#2
Which platform, Mybb or phbb? or WordPress?


#3
(13-09-2018, 03:50 PM)flexible Wrote: Which platform, Mybb or phbb? or WordPress?

Demo!! Just testing.


ihostright

Share This Post To The World






Users browsing this thread: 1 Guest(s)
Goto First Post In This Thread



Possibly Related Threads...
Thread Author Replies Views Last Post
Heart MUST READ: How Can I Setup Investment Website Like Fieldsmine flexible 0 217 15-05-2021, 05:49 PM
Last Post: flexible
  HELP: How Can I Add Post Views Widget On Blogger Please Help smartslimhub 1 3.9k 28-04-2020, 12:10 AM
Last Post: litesloaded
  How Can I Use My Forum Password On Smf Or Mybb Mattizzy 0 3.7k 23-07-2018, 09:19 PM
Last Post: Mattizzy
  TUTORIAL: Splitting Or Merging A Website Can Cause Months Of Unstable Search Ranking Talentedtk 1 5.6k 12-06-2018, 07:43 AM
Last Post: Princedan
  TUTORIAL: What Is Scratch And How To Locate It Url adegoldop6 3 6.6k 05-04-2018, 05:09 PM
Last Post: adegoldop6




Advertisement
ihostright