Advanced Mod Rewrite: ich bekomm das /cms/ nicht aus der URL
Verfasst: Mi 21. Okt 2009, 09:08
Guten Morgen zusammen,
ich hab hier eine recht umfanreiche Seite.(http://www.blabla.de)
auf dem server liegt die cotenido Instalation auf /seiten/hauptseite/ (dann halt /cms/ bzw /contenido/)
die doamin zeit auf o.g ordner. aso /seiten/hauptseite/
die url wird auch "schnön" dargestellt. also http://www.blabla.de/cms/hallo/seite.html
wie dekomm ich das /cms/ da raus ?
hab diveres versuchet. die z.b. .htaccess ins /cms/ und rewritebase auch /
es funktioniert nur wenn die .htacces im root (also /seiten/hauptseite/)liegt. ansonsten gits nen fehler (404)
.htacces sieht so aus :
Ich hoffe ich habs verständlich erklärt 
Danke schonmal,
René
ich hab hier eine recht umfanreiche Seite.(http://www.blabla.de)
auf dem server liegt die cotenido Instalation auf /seiten/hauptseite/ (dann halt /cms/ bzw /contenido/)
die doamin zeit auf o.g ordner. aso /seiten/hauptseite/
die url wird auch "schnön" dargestellt. also http://www.blabla.de/cms/hallo/seite.html
wie dekomm ich das /cms/ da raus ?
hab diveres versuchet. die z.b. .htaccess ins /cms/ und rewritebase auch /
es funktioniert nur wenn die .htacces im root (also /seiten/hauptseite/)liegt. ansonsten gits nen fehler (404)
.htacces sieht so aus :
Code: Alles auswählen
<IfModule mod_rewrite.c>
# Enable rewrite engine
# ---------------------
RewriteEngine on
# Specify a base URL-path for the rules
# -------------------------------------
RewriteBase /cms
# Catch some common exploits in query string to get rid of them
# NOTE: Conditions to prevent protocolls (ftp, http[s]) in query string could be a
# disadvantage in some cases
# --------------------------------------------------------------------------------
RewriteCond %{QUERY_STRING} contenido_path=.*$ [NC,OR]
RewriteCond %{QUERY_STRING} cfg\[path\]=.*$ [NC,OR]
RewriteCond %{QUERY_STRING} _PHPLIB\[libdir\]=.*$ [NC,OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} ftp://.*$ [NC,OR]
RewriteCond %{QUERY_STRING} http[s]*://.*$ [NC]
RewriteRule ^.* - [F,L] # all matching conditions from above will end in nirvana
# Rewrite request to root to front_content.php
# --------------------------------------------
RewriteRule ^$ front_content.php [QSA,L]
# Exclude following request from rewriting
# tests for valid symlinks (-s), not empty files (-l) and folders (-d)
# --------------------------------------------------------------------
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
# Pass other requests to front_content.php
# ----------------------------------------
RewriteRule ^.*$ front_content.php [QSA,NC,L]
</IfModule>

Danke schonmal,
René