LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-20-2016, 10:51 AM   #1
koby82
LQ Newbie
 
Registered: Mar 2016
Posts: 6

Rep: Reputation: Disabled
Mod_rewrite settings httpd.conf file


Hi All,

I would appreciate if some could give me some help.

I'm on Centos, and after installing and configuring Wordpress, everything works fine, until the Permalinks - URL rewrite feature...

I always receive 404 URL error on my internal pages...

This is how my httpd.conf file looks like at the mod_rewrite:


"
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride none

#
# Controls who can get stuff from this server.
#
Require all granted
"


I know that "AllowOverride" should be set to "All", but when I set this to All, the default Apache page appears only on my index page...

My .htaccess looks like:

"# 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>

# END WordPress"

Are there any other configuration steps to be done?

Thank You!
 
Old 03-21-2016, 04:23 AM   #2
hydrurga
Senior Member
 
Registered: Nov 2008
Distribution: Linux Mint 18 MATE
Posts: 1,214

Rep: Reputation: 345Reputation: 345Reputation: 345Reputation: 345
Your .htaccess looks fine. However, you do need to set an override at some point for the .htaccess to be taken into account.

What does your DocumentRoot directory entry look like in httpd.conf?

Can you please explain what you mean by this line?

Quote:
I know that "AllowOverride" should be set to "All", but when I set this to All, the default Apache page appears only on my index page...
 
Old 03-21-2016, 01:39 PM   #3
koby82
LQ Newbie
 
Registered: Mar 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hi hydrurga

Thanks for your reply.

I've only added the following line into my .htaccess:

Options Indexes FollowSymLinks

And it does work now...I can't explain why and how...but it works..

And with this, I mean:

Can you please explain what you mean by this line?

Quote:
I know that "AllowOverride" should be set to "All", but when I set this to All, the default Apache page appears only on my index page...


- I've set the main directory /var/www/ -> to Allowoverride All, and at that moment I received only the main Apache page when trying to access the website. It looked, as the domain root folder being empty...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I edit my /etc/httpd/conf.d/phpmyadmin.conf file? dishmsn3 Linux - Newbie 1 02-24-2015 11:39 PM
How to configure /etc/httpd/conf/httpd.conf file to run a html on web arunava.saha Red Hat 2 05-30-2012 04:28 AM
Starting httpd: httpd: Syntax error on line 209 of /etc/httpd/conf/httpd.conf: Syntax sethukpathi Linux - Networking 6 04-12-2008 12:26 PM
Please amend apache conf/httpd.conf file please payjoe Linux - Newbie 7 09-21-2007 06:12 PM
saving changes to apache2/conf/httpd.conf file Zaius Linux - Newbie 6 01-10-2004 12:45 AM


All times are GMT -5. The time now is 09:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration