[Modrewrite] Verzeichnisstruktur ändern

HaMa1

Newbie
Registriert
Juli 2012
Beiträge
2
Hallo,
tut mir Leid dass das Thema relativ lang ist würde mich aber trotzdem freuen wenn jemand einen Tipp geben könnte.

Ich habe bei einem Projekt Joomla ins Root Verzeichnis installiert und möchte jetzt noch einen Shop hinzufügen. Da die Joomla Artikel Links bereits alle von Google indexiert sind möchte ich die alte Struktur für Joomla gerne beibehalten aber den Shop ebenfalls im Root verfügbar machen (shop ist derzeit im "shop" Unterverzeichnis). Zur Verdeutlichung was ich meine:

Derzeit:
Code:
http://beispiel.de/ <- Joomla Startseite
http://beispiel.de/getting-started.htm <- Joomla Beitrag
http://beispiel.de/shop/ <- Shopsystem Startseite
http://beispiel.de/shop/produkt1.html <- Produkt im Shop


Soll aber so aussehen:
Code:
http://beispiel.de/blog <- Joomla Startseite
http://beispiel.de/getting-started.htm <- Joomla Beitrag
http://beispiel.de/ <- Shopsystem Startseite
http://beispiel.de/produkt1.html <- Produkt im Shop


Leider bin ich eine Niete wenn es um Modrewrite und reguläre Ausdrücke geht. Was ich bis jetzt versucht habe ist:

Code:
RewriteEngine on
RewriteBase /

# Hauptverzeichnis ausblenden:
RewriteCond %{HTTP_HOST} beispiel\.de$
RewriteCond %{REQUEST_URI} !^/shop

RewriteRule ^(.*)$ /shop/$1 [L]


Das funktioniert auch, um das shop verzeichnis auf Root umzuschreiben weiter bin ich aber leider nicht gekommen. Die htaccess von Joomla sieht original folgendermaßen aus:

Code:
RewriteBase /
 


## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# 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 %{REQUEST_URI} !^/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 %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.


die des Shopsystems Oxid so
Code:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /shop

RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]

RewriteCond %{REQUEST_URI} oxseo\.php$
RewriteCond %{QUERY_STRING} mod_rewrite_module_is=off
RewriteRule oxseo\.php$ oxseo.php?mod_rewrite_module_is=on [L]

RewriteCond %{REQUEST_URI} !(\/admin\/|\/core\/|\/application\/|\/export\/|\/modules\/|\/out\/|\/setup\/|\/tmp\/|\/views\/)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !(\.html|\/|\.jpg|\.css|\.pdf|\.doc|\.gif|\.png|\.js|\.htc)$ %{REQUEST_URI}/ [R=301,L]

RewriteCond %{REQUEST_URI} !(\/admin\/|\/core\/|\/application\/|\/export\/|\/modules\/|\/out\/|\/setup\/|\/tmp\/|\/views\/)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (\.html|\/)$ oxseo.php


RewriteCond %{REQUEST_URI} (\/out\/pictures\/)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (\.jpe?g|\.gif|\.png)$ getimg.php


Wäre super wenn jemand Ahnung von der Materie hätte und mir einen Tipp geben könnte. Danke!!!
 
Zurück
Oben