My website's home page file is news.php. I have enabled pretty urls and have added the output of gen_htaccess.php to my root folder's htaccess file. The url that appears for news.php is "http://www.example.com/news/", while the news items I post follow the pattern "http://www.example.com/news/article-title.html". Nevertheless, I don't like the idea of visiting my domain and landing at "http://www.example.com/news/". Ideally I would like someone visiting the home page to stay on the domain url: "http://www.example.com/". Additionally, would it be possible for a modification to be made that produces a "prettier" url for the news items such as "http://www.example.com/news/article-title/". In the past I have only written relatively simple statements with mod_rewrite and after looking at the output of gen_htaccess.php, I really don't know how to produce the aforementioned outcomes. Any assistance with this matter would be greatly appreciated. The relevant sections of my htaccess are as follows:
Lastly, the permissions in my couch folder have defaulted to 705 for folders and 604 for files. With security in mind, are these acceptable permission levels?
- Code: Select all
Options +FollowSymlinks -MultiViews
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.example\.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule . - [L]
#news.php
RewriteRule ^news$ "$0/" [R=301,L,QSA]
RewriteRule ^news/$ news.php [L,QSA]
RewriteRule ^news/.*?([^\.\/]*)\.html$ news.php?pname=$1 [L,QSA]
RewriteRule ^news/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ news.php?d=$1$2$3 [L,QSA]
RewriteRule ^news/[^\.]*?([^/\.]*)/$ news.php?fname=$1 [L,QSA]
RewriteRule ^news/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
</IfModule>
Lastly, the permissions in my couch folder have defaulted to 705 for folders and 604 for files. With security in mind, are these acceptable permission levels?