Post by cdamianou » Sun May 22, 2016 4:28 pm

Hi

I was wondering if there is anyone that can shed some light into my following issue.

I set up 2 rediects via cPanel to a youtube video that worked fine. The redirects were showing in the htaccess file as normal. I decided to chnage the location of the file the redirect goes to but when i went into cPanel there were no redirects. This wasn't an issue as the redirects were still in the htaccess file. I deleted these redirects and set new ones up for the new location via cPanel. The strange thing is the redirects are still going to the old locations.

The stranger thing is this. If I delete everything in the htaccess file and setup the redirect it works perfectly, but some functionality doesn't work on the site for example the information pages links. If I load up the old htaccess file and add the new redirect, it still redirects to the old youtube video.

Does anyone know what might be causing this? Is there somewhere on the site that has registered this old redirect and it is still in play somehow even though I cannot find a reference to it anywhere?

You help is very much appreciated.

http://www.magictao.co.uk


Active Member

Posts

Joined
Tue Aug 09, 2011 2:13 pm

Post by IP_CAM » Mon May 23, 2016 1:59 am

Better NOT mix up different things, the OC .htaccess file has, fundamentally, nothing to do with any other .htaccess file, possibly placed in your Server Root, and/or any other Sub/Section. BUT if you redirect something in a Root - .htaccess, it still may have some impact on a Shop. So, better set up your server in a proper manner first, or it could end up full of errors. Or then, get a Pro on such 'combined' .htaccess things.
Ernie

I'm no longer active at the OC Forum. To reach me, contact: jti@jacob.ch
A Demoversion of my free Opencart LIGHT v.1.5.6.5_rc Software
can be seen in Action here: http://www.bigmax.ch
---
930+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by cdamianou » Mon May 23, 2016 2:27 am

Thanks for your reply.

Im not entirely sure what you mean. When I create a redirect via cPanel, the redirect shows in the .htaccess file located public_html/.htaccess

I couldn't locate any other .htaccess file apart from the ones locataed in public_html

http://www.magictao.co.uk


Active Member

Posts

Joined
Tue Aug 09, 2011 2:13 pm

Post by IP_CAM » Mon May 23, 2016 2:57 am

cdamianou wrote:I couldn't locate any other .htaccess file apart from the ones locataed in public_html
But then, what is that supposed to mean !? :o

I'm no longer active at the OC Forum. To reach me, contact: jti@jacob.ch
A Demoversion of my free Opencart LIGHT v.1.5.6.5_rc Software
can be seen in Action here: http://www.bigmax.ch
---
930+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by cdamianou » Mon May 23, 2016 3:06 am

Exactly that. The only .htaccess file I can locate is in the public_html folder.

http://www.magictao.co.uk


Active Member

Posts

Joined
Tue Aug 09, 2011 2:13 pm

Post by IP_CAM » Mon May 23, 2016 3:25 am

sorry, I figured, from reading, you may succeeded in placing more... :D

Ok, in your shop software main directory, the is a file, called: .htaccess.txt, wich has to be
renamed to .htaccess, and first internally linked, before uploaded, to match
the SUB-Directory, where your shop has been placed.
Ernie
unfortunately, I have been blocked (again!), from accessing my own postings on this, here, so,
I cannot link them here. :crazy: It's a fun place... ;)
---
Lots of information on htaccess can be found here:
https://www.google.com/search?q=opencar ... Oka5aPibAL

I'm no longer active at the OC Forum. To reach me, contact: jti@jacob.ch
A Demoversion of my free Opencart LIGHT v.1.5.6.5_rc Software
can be seen in Action here: http://www.bigmax.ch
---
930+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by cdamianou » Mon May 23, 2016 3:46 am

This is what's in my htaccess file. At the end you an see the current redirect. For some reason it is still being redirected t the old YouTube redirect.

RewriteOptions inherit
# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.

# 2. In your opencart directory rename htaccess.txt to .htaccess.

# For any support issues please visit: http://www.opencart.com

Options +FollowSymlinks

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "\.(tpl|ini|log)">
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 /

RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.

# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off

# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off

# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M

# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M

# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200

# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200

RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^bazingabox$ "http\:\/\/XXXXXXX\.co\.uk\/explanations\/bazingabox\.html" [R=301,L]

http://www.magictao.co.uk


Active Member

Posts

Joined
Tue Aug 09, 2011 2:13 pm

Post by IP_CAM » Mon May 23, 2016 4:48 am

because of this here. probably:

Code: Select all

RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^bazingabox$ "http\:\/\/XXXXXXX\.co\.uk\/explanations\/bazingabox\.html" [R=301,L]
Ernie

I'm no longer active at the OC Forum. To reach me, contact: jti@jacob.ch
A Demoversion of my free Opencart LIGHT v.1.5.6.5_rc Software
can be seen in Action here: http://www.bigmax.ch
---
930+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by cdamianou » Mon May 23, 2016 6:17 pm

Hi Ernie

I changed the domain to xxxxx as I didn't want to make it public.

You can see that the redirect is set ok. But the redirect goes to youtube rather then /explanations\/bazingabox\.html

But if I clear the htaccess file and just have this redirect, it works as it should.

http://www.magictao.co.uk


Active Member

Posts

Joined
Tue Aug 09, 2011 2:13 pm

Post by IP_CAM » Tue May 24, 2016 2:33 am

I just recall, to have been reading, that you used C-Panel to add routing-content to the .htaccess-file. It could therefore be possible, that a 'hidden' SERVER System .htaccess-type file exists, specifically for your 'Account', wich possibly cannot be seen/handled directly by use of an FTP-Client, and therefore should be changed as well.

On my Server, CUSTOM SERVER SIDE PHP SYSTEM Modifications are then placed visibly
into the Site ROOT Section, and named:
.user.ini
presently containing Site Configuration Information, such as:
[PHP]
memory_limit = 640M

to be system-valid for this individual URL/SITE only, after defining such in my Server ADMIN PHP Setting Sections.

I assume, that it could be, that your Hoster has a Setup, similar to such, C-Panel enabled, and valid, as soon as you
activate your (or any !?) Site .htaccess file. Who knows?

It's a wild idea, but better check on such too.
But since C-Panel is unfamiliar to me, I have no Clue... 8)
rgds,
Ernie

I'm no longer active at the OC Forum. To reach me, contact: jti@jacob.ch
A Demoversion of my free Opencart LIGHT v.1.5.6.5_rc Software
can be seen in Action here: http://www.bigmax.ch
---
930+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by victorj » Tue May 24, 2016 6:08 am

cpanel needs a empty .htaccess, if not empty like in opncart .htaccess, redirects will be appended to end off file.
redirects to other sites will have to be at beginning of .htaccess before the rewrite rules op opencart.

So you can create the rewrite rules, but copy them from end of .htaccess to the top of .htaccess.
make sure that you have statement RewriteEngine On in front of the rewrites.

also consider that if you use chrome or firefox, they tend to keep old info in browser, so if you visited old url, changed it and revisit, it will still show old ulr, so make sure you clear browser cache before testing, close browser and reopen and restest.

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Eigen productie en snelle levering.
https://123-deurrubbers.com


User avatar
Expert Member
Online

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by cdamianou » Tue May 24, 2016 7:29 pm

victorj WOW WOW WOW thank you. That has worked. Thank you very much. And thank you to Ernie as well for your initial help.

http://www.magictao.co.uk


Active Member

Posts

Joined
Tue Aug 09, 2011 2:13 pm
Who is online

Users browsing this forum: No registered users and 88 guests