Problem: I want the url to look like http://www.mysite.com/articles/news/art-name and not http://www.mysite.com/articles/news/newscms/art-name.html (the added "newscms" is because I have an index file in the directory http://www.mysite.com/articles/news that isn't the template file.
Solution:
Don't use pretty urls in Couch
Create a .htaccess file in your root directory with the following code
Create a .htaccess file in the /news directory
repeat the code snippet above for each cloneable template
Solution:
Don't use pretty urls in Couch
Create a .htaccess file in your root directory with the following code
- Code: Select all
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\.mysite\.com$ [NC]
RewriteRule ^(.*)$ https://www.mysite.com/$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
Create a .htaccess file in the /news directory
- Code: Select all
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ newscms.php?pname=$1 [NC]
repeat the code snippet above for each cloneable template
