Using Permalinks without .htaccess
-
Hi all,
I am own a server at home, it is Linux Base.
And I do some research on Apache httpd, it KB said that using .htaccess file is not a good idea for heavy site on performance reason.Now I am plan make my web site url as permalinks like most WordPress user there.
But I don’t want to make the .htaccess for the server. I hear that if you are the admin of the server, you can edit the httpd.conf or website.com.conf by <Directory> this way.
So I have some questions there not too clear and need help before I edit the conf and make the httpd restart, worry something wrong will make the web site down.
Detail inform on my web site list below.
Root URL:
http://explorerhome.dyndns.org
(This is a HTML static Home Page)WordPress URL:
http://explorerhome.dyndns.org/blog
(This mean I install the WordPress on /blog , and it is WordPress root path)Here are my website.conf file in the apache, it is named
explorerhome.dyndns.org.conf<VirtualHost *:80>
ServerName explorerhome.dyndns.org
DocumentRoot /www/website/public_html
</VirtualHost>Above is the URL Root that you see the http://explorerhome.dyndns.org
So the WordPress path actually is install on
/www/website/public_html/blogThen I am wonder, do I can add this to the ‘explorerhome.dyndns.org.conf’ this file to make it work like the .htaccess do?
<Directory “/www/website/public_html”>
…
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
</Directory>or using this
<Directory “/www/website/public_html/blog”>
…
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
</Directory>Which one is suit for my case?
Thank you very much and wish you have a nice day.
The topic ‘Using Permalinks without .htaccess’ is closed to new replies.