Ask Your Question
1

wordpress, permalinks and .htaccess problem.

asked 2013-08-28 10:43:07 -0500

yn1v gravatar image

I have usually installed wordpress by downloading form wordpress site. This time I felt that I owe some respect to people packaging wordpress for fedora. I installed all that I needed: httpd, mariadb, php and worpress using yum. Worked the secure installation for dataabase and created the new ones. At last mastered the systemctl coommand. I even follow instructions to correct some selinux warnings instead of disabling selinux. So far so good.

The problem was when I tried to enable permalinks. I got a message form wordpress that my .htaccess file does not have write permisison. I got some rules that I have to add to .htaccess file to enable mod-rewrite. I used the phpinfo to verify that I have the mod-rewrite in httpd. I made a a search for .htaccess as su (root) form the root (/) I did: find -name ".htaccess". There was none in the system.

I created a file .htaccess with the content provided by wordpress. I tried to place it at /var/www/htlm/ then triend to place it at /usr/share/wordpress/ next to index.php of wordpress. This is all I have in .htacces file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

My questions: Where do I have to place the .htacces file? Do I have to add something else to the .htaccess file?

Any help will be appreciated.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
2

answered 2013-08-29 06:46:31 -0500

baptistemm gravatar image

Concerning the file .htaccess it has to be put at the top of the directory defined the DocumentRoot of the virtualhost file used for your blog.

edit flag offensive delete link more

Comments

The file .htaccess that I created, make no difference in /usr/share/wordpress/ where index.pho is located or /var/www/html/ where there is nothing so far.

yn1v gravatar imageyn1v ( 2013-09-02 12:28:27 -0500 )edit
2

answered 2013-08-29 06:59:19 -0500

remi gravatar image

If you keep standard provided configuration, using /workpress address, I think you should better edit the provided /etc/httpd/conf.d/wordpress configuration file

In this case you should also use RewriteBase /wordpress/ (included into the Directory directive)

edit flag offensive delete link more

Comments

I did try this and editing this file ended up in internal server error

yn1v gravatar imageyn1v ( 2013-09-02 12:25:55 -0500 )edit
0

answered 2013-08-29 21:21:18 -0500

DmitryZayats gravatar image

If you are using apache - check what is your AllowOverride setting in file /etc/httpd/conf/httpd.conf

When this directive is set to None, then .htaccess files are completely ignored. In this case, the server will not even attempt to read .htaccess files in the filesystem.

Once you change AllowOverride setting - you will need to restart apache

edit flag offensive delete link more

Comments

I changed AllowOverride to all instead of none in the etc/htpd/conf/httpd.conf and restarted the httpd service. It make no diference, After doing that I tried all the sugestion avobe.

yn1v gravatar imageyn1v ( 2013-09-02 12:30:16 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-08-28 10:43:07 -0500

Seen: 1,106 times

Last updated: Aug 29 '13