Post by Khal » Wed Dec 08, 2021 6:15 pm

I am trying to redirect a Category page to an updated url. I have an SEO module which can redirect pages, but it does not seem to be working. The support for the extension has expired. So I have tried to add the url in the htaccess file like this:

But it still doesn't work. With this code, I get redirect to this page: https://domain.com/khimar-overhead-jilb ... ead-abaya/

So I have tried adding a ? to the new url as I saw this on a fix somewhere, but again this does not work.

Code: Select all

RewriteEngine On

Redirect /khimar-overhead-abaya https://domain.com/khimar-overhead-jilbab/

RewriteCond %{HTTPS} off

RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Options +FollowSymlinks

# Prevent Directory listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|.twig|\.ini|\.log|(?<!robots)\.txt))">
 Require all denied
## For apache 2.2 and older, replace "Require all denied" with these two lines :
# Order deny,allow
# Deny from all
</FilesMatch>

# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/

RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
I know there are a lot of Rewrite rules in my htacess file. Could this have something to do with it?

OC v 2.0.1.1

Thank you

Active Member

Posts

Joined
Thu May 24, 2012 9:24 pm
Location - Teesside, UK

Post by paulfeakins » Thu Dec 09, 2021 11:04 pm

Khal wrote:
Wed Dec 08, 2021 6:15 pm
I am trying to redirect a Category page to an updated url.
What exact URL do you want to redirect to what exact URL?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by Khal » Thu Dec 09, 2021 11:15 pm


Active Member

Posts

Joined
Thu May 24, 2012 9:24 pm
Location - Teesside, UK

Post by xxvirusxx » Fri Dec 10, 2021 3:54 am

Why you don't do that from Cpanel?

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by Khal » Fri Dec 10, 2021 9:29 pm

xxvirusxx wrote:
Fri Dec 10, 2021 3:54 am
Why you don't do that from Cpanel?
I've tried in C panel also and I get the same Not Found page and url: https://khaleejiabaya.com/khimar-overhe ... ead-abaya/

Active Member

Posts

Joined
Thu May 24, 2012 9:24 pm
Location - Teesside, UK

Post by xxvirusxx » Fri Dec 10, 2021 9:36 pm

Try this

Code: Select all

Redirect 301 /khimar-overhead-abaya https://khaleejiabaya.com/khimar-overhead-jilbab/

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by by mona » Fri Dec 10, 2021 9:50 pm


DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by Khal » Fri Dec 10, 2021 10:32 pm

xxvirusxx wrote:
Fri Dec 10, 2021 9:36 pm
Try this

Code: Select all

Redirect 301 /khimar-overhead-abaya https://khaleejiabaya.com/khimar-overhead-jilbab/
I've just tried that, with the slash at the end of the new url, but unfortunately it doesn't work :(

Active Member

Posts

Joined
Thu May 24, 2012 9:24 pm
Location - Teesside, UK

Post by Khal » Fri Dec 10, 2021 10:57 pm

xxvirusxx wrote:
Fri Dec 10, 2021 10:25 pm
viewtopic.php?t=166848
I've also gone through that thread - thanks for the link- and tried all combinations suggested. The thread didn't actually mention the fix that finally worked, just that it was now working.

I still keep getting the same url returned when I try different code: https://khaleejiabaya.com/khimar-overhe ... ead-abaya/

Active Member

Posts

Joined
Thu May 24, 2012 9:24 pm
Location - Teesside, UK

Post by xxvirusxx » Sat Dec 11, 2021 2:56 am

Khal wrote:
Fri Dec 10, 2021 10:57 pm
The thread didn't actually mention the fix that finally worked, just that it was now working.
I think was fixed...if in the title is added [solved]

Also you can search modules on markeplace

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by Khal » Mon Dec 13, 2021 7:56 pm

I already have a module installed that has a feature to add redirects, but this feature is not working on the module. The developer is not responding to my request to extend my expired support for the extension - SEO Pack Pro - to resolve the issue.
So now I'm stuck trying to figure it out for myself.

Active Member

Posts

Joined
Thu May 24, 2012 9:24 pm
Location - Teesside, UK
Who is online

Users browsing this forum: No registered users and 59 guests