Page 1 of 1

[GELÖST] SEO Urls funktionieren nicht (Win-Server)

Posted: Sun Feb 17, 2019 6:44 pm
by Stef97
Hey,

ich habe jetzt seit mehereren Wochen versucht es hinzubekommen, dass in meinem Shop die SEO Urls laufen. Ich habe dazu wie in mehreren Tutorials gezeigt die .txt Endung entfernt, in den System Einstellungen SEO Urls aktiviert und dann über Product > SEO Urls die Urls hinzugefügt. Auch habe ich schon nach dem Fehler geschaut und habe sehr viel ausprobiert.

Ich bekomme aber jedesmal einen 404 Error (aufgerufene Seite kann nicht gefunden werden):
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.


Die URL sieht bei klick wenn man eine SEO Url hinzugefügt hat wie folgt aus: https://---.de/agb.

Meine .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 "(?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]

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


Warum geht das nicht?

PS: Der Editor mit seinen Zusatfunktionen funktioniert bei mir nicht.

Stef97

Re: SEO Urls funktionieren nicht

Posted: Mon Feb 18, 2019 7:43 pm
by OSWorX
Hallo,

bitte generell (!!!) nie 2 Themen in einer Nachricht mischen (hier SEO & Editor).

Dann - ebenfalls gilt immer:
1. welche Shopversion
2. welche Vorlage
3. welche zusätzlichen Erweiterungen installiert
4. eventuell anderweitige Änderungen vorgenommen

Dann hier speziell:
5. welche Serverumgebung (Linux oder Windowsschrott)
6. Shopdateien im richtigen Verzeichnis (in der .htaccess ist aktuell / angegeben)

Die Zeilen ab ### Additional Settings kann man ohne weiters löschen da sie nur auf den wenigtsen System greifen wenn aktiviert.

Editor: welcher Editor mit welchen Zusatzfunktionen ??

Re: SEO Urls funktionieren nicht

Posted: Tue Feb 19, 2019 2:53 am
by Stef97
Hey,

1. Shopversion : 3.0.2.0
2. Vorlage: zCamera
3. Erweiterungen: Zenchat, Facebook Plugin
4. Nein
5. Serverumgebung: Windows Server
6. Ja ich denke.

Okay alles klar.

Auf dem Server läuft ja die normale .htaccess nicht. Ich habe erfahren, dass es dort eine web.config gibt. Da habe ich dann dies gefunden:

Code: Select all

<rewrite>
  <rules>
    <rule name="Imported Rule 1" stopProcessing="true">
      <match url="^(.*)$" ignoreCase="false" />
      <conditions>
        <add input="{HTTP_HOST}" pattern="^example\.com$" />
      </conditions>
      <action type="Redirect" redirectType="Permanent" url="http://www.example.com/{R:1}" />
    </rule>
    <rule name="Imported Rule 2" stopProcessing="true">
      <match url="^(.*)$" ignoreCase="false" />
      <conditions>
        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
        <add input="{URL}" pattern="^/favicon.ico$" ignoreCase="false" negate="true" />
      </conditions>
      <action type="Rewrite" url="index.php?q={R:1}" appendQueryString="true" />
    </rule>
  </rules>
</rewrite>
Habe dies auch in die web.config dann kopiert. Aber dann kam immer ein Fatal Error (HTTP Error 500).

Zum Editor: Ich meine diesen Editor hier im Forum.

Grüße,
Stef

Re: SEO Urls funktionieren nicht

Posted: Tue Feb 19, 2019 6:41 pm
by OSWorX
Windowsserver ist nicht gut .. aber wer das will ..
Daher, .htaccess funktioniert auf Windowsservern nicht (daher auch meine Frage nach der Konfiguration).
Hier etwas zum lesen: https://docs.microsoft.com/en-us/iis/ap ... -webconfig

Dann (schon etwas älter): viewtopic.php?f=181&t=183614&p=672122p672122#p672122

Dann: auch mal bitte selber die Suche hier bemühen.

Editor: war ein interner Fehler, wurde gestern behoben und sollte jetzt wieder passen.

Re: SEO Urls funktionieren nicht

Posted: Fri Feb 22, 2019 7:57 pm
by Stef97
Hey,

vielen Dank. Es war mit deinen Links sehr einfach umsetzbar.

Grüße