Du befindest Dich im Archiv vom ABAKUS Online Marketing Forum. Hier kannst Du Dich für das Forum mit den aktuellen Beiträgen registrieren.

URL-Schrägstrich und index.php in htaccess

Hier können Sie Ihre Fragen zum Thema Suchmaschinenoptimierung (SEO) / Positionierung stellen
Neues Thema Antworten
stiffler3000
PostRank 1
PostRank 1
Beiträge: 13
Registriert: 08.06.2011, 14:11

Beitrag von stiffler3000 » 24.11.2011, 19:20

Hallo SEO-Experten,

ich habe im Forum nach einer Lösung für folgendes Problem gesucht, aber leider nichts gefunden, oder hatte die Lösung vor Augen und konnte sie nicht auf mein Problem übertragen.

Problem 1:
Ich würde gerne am Ende der URL einen Schrägstrich anhängen und die Version ohne "/" am Ende an diese URL als 301 weiterleiten.

Ist: www.nordicfit.at/blog
Soll: www.nordicfit.at/blog/

Natürlich sollte das nicht bei Dateien passieren (z.B. bei PDF zum Download).


Problem 2:
Wie kann ich hinbekommen, dass ein Aufruf mittels index.php gleich zu www.nordicfit.at/ weitergeleitet wird?

Ich würde mich sehr über eine Rückmeldung freuen!

Vielen Dank im Voraus.

Mit freundlichen Grüßen,
Stefan


Folgende htaccess besteht aktuell (Joomla-Seite):

Code: Alles auswählen

RewriteEngine On

## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site block out the operations listed below
# This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL.
RewriteCond %&#123;QUERY_STRING&#125; &#40;<|%3C&#41;&#40;&#91;^s&#93;*s&#41;+cript.*&#40;>|%3E&#41; &#91;NC,OR&#93;
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %&#123;QUERY_STRING&#125; GLOBALS&#40;=|\&#91;|\%&#91;0-9A-Z&#93;&#123;0,2&#125;&#41; &#91;OR&#93;
# Block out any script trying to modify a _REQUEST variable via URL.
RewriteCond %&#123;QUERY_STRING&#125; _REQUEST&#40;=|\&#91;|\%&#91;0-9A-Z&#93;&#123;0,2&#125;&#41;
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php &#91;F&#93;
#
## End - Rewrite rules to block out some common exploits.

RewriteCond %&#123;HTTP_HOST&#125; ^nordicfit\.at &#91;NC&#93; 
RewriteRule &#40;.*&#41; http&#58;//www.nordicfit.at/$1/ &#91;L,R=301&#93;

RewriteBase /

## Begin - Joomla! core SEF Section.
#
RewriteRule .* - &#91;E=HTTP_AUTHORIZATION&#58;%&#123;HTTP&#58;Authorization&#125;&#93;
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %&#123;REQUEST_URI&#125; !^/index\.php
# and the request is for something within the component folder,
# or for the site root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %&#123;REQUEST_URI&#125; /component/|&#40;/&#91;^.&#93;*|\.&#40;php|html?|feed|pdf|vcf|raw&#41;&#41;$ &#91;NC&#93;
# and the requested path and file doesn't directly match a physical file
RewriteCond %&#123;REQUEST_FILENAME&#125; !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %&#123;REQUEST_FILENAME&#125; !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php &#91;L&#93;
#
## End - Joomla! core SEF Section.

Anzeige von ABAKUS

von Anzeige von ABAKUS »


Hochwertiger Linkaufbau bei ABAKUS:
  • Google-konformer Linkaufbau
  • nachhaltiges Ranking
  • Linkbuilding Angebote zu fairen Preisen
  • internationale Backlinks
Wir bieten Beratung und Umsetzung.
Jetzt anfragen: 0511 / 300325-0

tmyp
PostRank 6
PostRank 6
Beiträge: 483
Registriert: 07.08.2010, 15:00

Beitrag von tmyp » 24.11.2011, 19:22

Das musst Du vermutlich in Joomla machen, denn das läuft alles über Joomla.

Ich würde sowas ja nie einsetzen, daher reine Spekulation. Ich vermute: es gibt keine Ordner, sondern das ist alles dynamisch. Entsprechend kann dir mod_rewrite da nicht helfen, da muss Joomla direkt dran. Vielleicht gibt es ein Plugin?

pr_sniper
PostRank 9
PostRank 9
Beiträge: 1766
Registriert: 07.02.2006, 19:21

Beitrag von pr_sniper » 24.11.2011, 19:48

Beides ist Blödsinn, hat mit HTML und Ranking nichts zu tun. Gelistet und gerankt werden HTML-Seiten, nicht aber leere Ordner (hier "blog") oder die Domain.

Im ersten Falle gehören immer HTML-Dateien, ggf. auch mit weiteren Unterordnern, hinzu. Im zweiten Falle wird beim Aufruf der Domain ebenfalls eine Datei aufgerufen, regelmäßig die index.html, index.htm, default.html usw.

Wie kommst du auf solche "Spezialaufgaben"? - Für die Erstellung einer .htaccess gibt es ansonsten ausreichend Quellen.