Post by by_gabrielos » Mon Dec 31, 2012 6:17 am

Salutare.

Am o problema legata de redirect 301
in .htaccess am facut urmatoarele modificari

Code: Select all

RewriteEngine On
Options +FollowSymLinks  --------> adaugat de mine
RewriteCond %{HTTP_HOST} ^site.ro [NC] --------> adaugat de mine
RewriteRule ^(.*)$ http://www.site.ro/$1 [R=301,L] --------> adaugat de mine

RewriteCond %{QUERY_STRING} ^route=common/home$ --------> adaugat de mine
RewriteRule ^index\.php$ http://www.site.ro? [R=301,L] --------> adaugat de mine

RewriteCond %{THE_REQUEST} ^.*/index\.php --------> adaugat de mine
RewriteRule ^(.*)index.php$ http://www.site.ro/$1 [R=301,L] --------> adaugat de mine


RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [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]
Dupa cum bine vedeti am vrut sa fac doar atat:
1. redirect din non www catre www
2. disparitia route=common/home (problema des intalnita si evident usor de rezolvat)
3. redirect din www.site.ro/index.php catre www.site.ro

Nu stiu ce este gresit pentru ca in momentul in care intru pe www.site.ro/admin si incerc sa ma loghez... pauza, nu se intampla nimic. Initial a functionat totul pana cand am scris regula de redirect de la www.site.ro/index.php la www.site.ro (deci cu regulile de permanent redirect din non www catre www si disparitia route=common/home puteam sa ma loghez) Practic acum trebuie sa sterg toate trei regulile ca sa pot intra in admin si este enervant, nu mai functioneaza cu nicio regula :-\

Ceva sugestii? Am facut si clean cache dar... nimic

New member

Posts

Joined
Sat Dec 29, 2012 6:11 am

Post by by_gabrielos » Mon Dec 31, 2012 6:58 am

Revin, am gasit o mica rezolvare pentru intreaga problema
Am schimbat

Code: Select all

RewriteCond %{THE_REQUEST} ^.*/index\.php 
RewriteRule ^(.*)index.php$ http://www.site.ro/$1 [R=301,L] 
cu

Code: Select all

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php?\ HTTP/
RewriteRule ^(.*)index\.php?$ http://www.site.ro/$1 [R=301,L]
si se pare ca s-au rezolvat punctele 2 si 3. Acum www.site.ro/index are permanent redirect catre www.site.ro si route=common/home a disparut din problema (ceea ce este bine) :crazy:
Ce ma incurca este doar acel cod care face redirect din non www catre www. Este atat de simplu si totusi nu pricep ce se petrece de nu vrea sa imi functioneze interfata de admi. Am instalat OC 1.5.4 si nu cred ca e vreun bug sau...
Ce este gresit acolo de nu reusesc sa ma conectez in admin? :-[

New member

Posts

Joined
Sat Dec 29, 2012 6:11 am

Post by Axansh » Mon Dec 31, 2012 7:30 pm

hi,

Am dezvoltat o extensie pentru SEO - pentru a face mai ușor pentru vânzător.

Acest modul vă ajută cu optimizarea URL-ului de toate paginile site-ului dvs., categorii, produse, producatori, pagini de informare.

puteți optimiza, de asemenea, titlurile, cuvintele cheie meta tag, descrieri metaeticheta de toate legăturile, categorii, produse, producatori, pagini de informare.

Dacă adăugați link-uri noi sau de date Catalog - ele pot fi la fel de bine optimizate.

Toate optimizări se poate face pentru mai multe limbi.

Numele poate fi, de asemenea, fotografie optimizat.

Pentru rezultate rapide, mai puțin datele de intrare - puteți utiliza facilitatea de a genera automat

Thanks and Best Regards,
Axansh Sheth

Our Opencart Module
All in ONE SEO |
Multi-purpose pop |
Restaurant theme |
Store time save module


User avatar
Active Member

Posts

Joined
Mon Feb 06, 2012 3:07 pm

Post by by_gabrielos » Mon Dec 31, 2012 9:21 pm

Revin cu rezolvarea problemei in cazul meu (posibil ca altii sa pateasca la fel si asa am rezolvat eu)

Am reinstalat opencart 1.5.4 (fresh install) si am facut o mica modificare.
Din Softaculous am selectat la prima optiune -> Choose Protocol varianta "http://www." (initial aveam setata varianta "http://" fara www)

Ulterior, dupa finalizarea instalarii am redenumit .htaccess.txt in .htaccess (direct din filezilla cu click dreapta si rename)

fisierul meu .htaccess arata asa acum:

Code: Select all

RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [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]

RewriteCond %{QUERY_STRING} ^route=common/home$
RewriteRule ^index\.php$ http://www.mysite.ro? [R=301,L]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php?\ HTTP/
RewriteRule ^(.*)index\.php?$ http://www.mysite.ro/$1 [R=301,L]

RewriteCond %{HTTP_HOST} ^mysite\.ro [NC]
RewriteRule (.*) http://www.mysite.ro/$1 [L,R=301]
Cu alte cuvinnte am scapat de problema "route=common/home" (des intalnita - ma repet)
Permanent redirect din http://www.mysite.ro/index.php in http://www.mysite.ro
Si evdent permanent redirect din non www catre www

Multumesc celor care doar s-au uitat la postul meu :) Ce sa mai, perseverenta rezolva totul. La multi ani la toti!

P.S nu cred ca e neaparat nevoie de extensie :crazy:
P.S 2 acest link http://www.ragepank.com/redirect-check/ verifica daca setarile sunt facute corect (ma refer la 301 redirect si http://www.mysite.ro/index.php in http://www.mysite.ro) La mine spune asa : All looks ok chief.

New member

Posts

Joined
Sat Dec 29, 2012 6:11 am

Post by Viorel » Thu Jan 03, 2013 8:27 pm

Salut,
Ma confrunt cu problema urmatoare:
Nu pot face Ia-ma in cos de pe pagina de produs dar din listing si home page da. Am incercat cu .htaccess dupa modelul de mai sus dar ma blocheaza in admin si nu mai pot ace add in cos de niciunde.
Rog ajutor urgent:
Listing .htaccess:
# 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 /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [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]

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

# 7. disable open_basedir limitations
# php_admin_value open_basedir none

Cu multumiri!

Newbie

Posts

Joined
Wed Nov 21, 2012 6:17 pm
Who is online

Users browsing this forum: No registered users and 13 guests