i have a website. A part of the website is wordpress the other part is without a CMS. I use the following .htaccess for my website. But the URLs which came from the "none cms-part" ( which have the slug /expose/ID ) of the website are accessible with and without www. When i use a rewrite Cond rule i get a 500 Servererror
i used the following rewrite rule:
RewriteCond %{HTTP_HOST} ^mydomain\.de$
RewriteRule ^(.*)$ http://www.mydomain/$1 [R=permanent]
And here is my complete htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*?[^/])$ %{REQUEST_URI}/ [L,R=301,NE]
RewriteRule ^unternehmen-2-2/?$ /unternehmen [L,R=301,NC]
RewriteRule ^expose/(.*)/$ content/index.php?content=expose&query=$1 [L,QSA]
</IfModule>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
I Hope somebody can help me that the urls with the slug /expose/id are only accessible with www