Post by reggiewills » Fri Jan 22, 2021 4:22 pm

Hi I need to re-direct some pages to the homepage of opencart.

For examle:
https://mywebsitenamehere.com/index.php ... e/register

301 redirect to:
https://mywebsitenamehere.com/

Snippet of my .htaccess:

# 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]

Thank you!!

Newbie

Posts

Joined
Fri Jan 22, 2021 12:50 am

Post by xxvirusxx » Fri Jan 22, 2021 5:54 pm

Why don't do that from Cpanel?

Extensions converted by me | Custom 3.0.3.7 | Buy me a beer


User avatar
Expert Member

Posts

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

Post by thekrotek » Fri Jan 22, 2021 6:21 pm

This topic IS NOT related to OpenCart. Please, use Google on the matter. Plenty solutions out there.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by reggiewills » Fri Jan 22, 2021 6:27 pm

thekrotek wrote:
Fri Jan 22, 2021 6:21 pm
This topic IS NOT related to OpenCart. Please, use Google on the matter. Plenty solutions out there.
Hi, these pages are opencart pages on an opencart site.

Newbie

Posts

Joined
Fri Jan 22, 2021 12:50 am

Post by xxvirusxx » Fri Jan 22, 2021 6:32 pm

xxvirusxx wrote:
Fri Jan 22, 2021 5:54 pm
Why don't do that from Cpanel?

Extensions converted by me | Custom 3.0.3.7 | Buy me a beer


User avatar
Expert Member

Posts

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

Post by thekrotek » Fri Jan 22, 2021 6:39 pm

reggiewills wrote:
Fri Jan 22, 2021 6:27 pm
Hi, these pages are opencart pages on an opencart site.
Again, this topic IS NOT related to OpenCart, .htaccess is a common server configuration file. Use Google to find a solution.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by sw!tch » Fri Jan 22, 2021 6:45 pm

thekrotek wrote:
Fri Jan 22, 2021 6:39 pm
reggiewills wrote:
Fri Jan 22, 2021 6:27 pm
Hi, these pages are opencart pages on an opencart site.
Again, this topic IS NOT related to OpenCart, .htaccess is a common server configuration file. Use Google to find a solution.
Agreed.

If you want a core solution then consider using opencarts event system to handle the redirect.

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm
Location - USA
Who is online

Users browsing this forum: No registered users and 13 guests