PDA

View Full Version : Problem mit ModRewrite


westmind
07-28-2008, 02:52 AM
Hallo Leute,

ich habe mir jetzt hier im Forum einen abgesucht und keine Hilfe gefunden.

Ich habe PhpLinkDirectory 3.3 auf meinen Server geschoben. Installation lief jetzt gut durch...

Meine Installation ist im Hauptverzeichnis.

ModRewrite ist definitiv eingeschaltet, denn es wird für andere Projekte benutzt. Hier mal meine .htaccess

Die URLs werden obwohl ich den Punkt im Backend angeschaltet habe nicht umgeschrieben!? Warum?


#################################################
## PHP Link Directory - Apache Server Settings ##
#################################################

# Prevent .htaccess and .htpasswd files from being viewed by web clients
<Files "^\.ht">
Order allow,deny
Deny from all
</Files>

# Protect files
<Files ~ "^(.*)\.(inc|inc\.php|tpl|sql)$">
Order deny,allow
Deny from all
</Files>

# Protect directories
<Files ~ "^(backup|files|images|include|lang|libs(/.+)?|temp(/.+)?|templates(/.+)?|javascripts(/.+)?)$">
Order deny,allow
Deny from all
</Files>

# Disable directory browsing
Options -Indexes

# Follow symbolic links in this directory
Options +FollowSymLinks

# Override PHP settings that cannot be changed at runtime
# (If your server supports PHP settings via htaccess you can comment following two lines off)
# php_value register_globals 0
# php_value session.auto_start 0

# Customized error messages
# ( If you are running in a subfolder please add it, example: "directory/index.php?httpstatus=404" )
ErrorDocument 404 index.php?httpstatus=404

# Set the default handler
DirectoryIndex index.php

# URL rewrite rules
<IfModule mod_rewrite.c>
RewriteEngine On


#Make sure RewriteBase points to the directory where you installed phpLD.
#Example: "/phpld" if your installation is in a "phpld" subdirectory.

RewriteBase /

##Latest Links Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^latest-links\.htm[l]?$ index.php?list=latest [QSA,NC,L]

##Top Hits Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^top-hits\.htm[l]?$ index.php?list=top [QSA,NC,L]

##Latest Articles Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^latest-articles\.htm[l]?$ index.php?list=latestarticles [QSA,NC,L]

##Details Link Page Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)detail/link-(.*)\.htm[l]?$ detail.php [QSA,NC]

##Article Page Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)articles/article-(.*)\.htm[l]?$ article.php [QSA,NC]

##Author Page Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)authors/author-(.*)\.htm[l]?$ author.php [QSA,NC]

##Owner Page Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)owner/owner-(.*)\.htm[l]?$ author.php [QSA,NC]

##Pagination Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)page-[0-9]+\.html$ index.php [QSA,NC,L]

##Pages redirect
RewriteCond %{REQUEST_URI} !page-[0-9]+\.html?$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)\.html$ page.php?name=$1 [NC,QSA,L]

##Category redirect
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>

westmind
07-28-2008, 04:17 PM
Weiss keiner eine Lösung? Mir kommt es so vor, als wenn der Umschalter im Admin Bereich gar keine Aktion auslöst...

pragent
07-28-2008, 04:36 PM
Ohne URL geht nix ... das kann verschiedene Ursachen haben.:cool:

westmind
07-28-2008, 04:42 PM
Ich kann hier irgendwie keine URL Posten, daher ersetze ich mal den Punkt durch eine #.

www#mvn#de

pragent
07-28-2008, 04:43 PM
Gib mir mal nen Adminzugang per PN!
Oder leg mal eine Kategorie an ....

westmind
07-28-2008, 04:49 PM
Habe ich per PN geschickt.

pragent
07-28-2008, 04:57 PM
Hab mal nen Test gemacht.
Änder einfach die Links in der topbar.tpl ... ansonsten funktioniert alles;)


Hier nochmal eine Hilfe für deine Frage:

Das haust Du in die .htaccess

Options +FollowSymLinks
RewriteRule submit_article/(.*)/(.*)/$ /submit_article.php?$1=$2

Ein Link wäre dann:
http://www.mvn.de/submit_article/c/1/



Kleine Hilfe wäre vieleicht dieser Mod-Rewrite-Generator:
http://www.webmaster-toolkit.com/mod_rewrite-rewriterule-generator.shtml (http://www.webmaster-toolkit.com/mod_rewrite-rewriterule-generator.shtml)

westmind
07-28-2008, 05:10 PM
Danke für die Hilfe.

pragent
07-28-2008, 08:24 PM
Gern geschehen;)