• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.1 Pretty URL Not Working Completely

#1
I believe the XenForo guide states that to enable pretty URL for Apache all I have to do is:
1. Confirm mod_rewrite is installed - YES
2. Create an .htaccess file on the xenForo root - YES
3. Turn on pretty URL through the Admin > Options settings.

When I did that the last time, everything is broken. Blank pages including the admin screen. Anything I missed? Luckily I had to reinstall my VPS and so I'm starting back from scratch again.

Apache is the most common web server available. If you are unsure what web server you are running, it is likely Apache. Therefore, XenForo includes the necessary configuration file in the root directory.
If after uploading XenForo, you do not see an ".htaccess" file in your XenForo root directory, rename htaccess.txt to .htaccess (be sure to include the "." prefix). You should now be able to enable friendly URLs. If, after enabling friendly URLs your XenForo installation does not function correctly, please contact your host to confirm that they have mod_rewrite installed and allow overrides via an .htaccess file.
 
#2
Still nothing.. :(

Got the mod_rewrite
Got the .htaccess (From the htaccess.txt file)

Not Found

The requested URL /forums/headphone-full-size.4/ was not found on this server.
Apache/2.2.16 (Debian) Server at headphone-id.com Port 80
 
#3
Okay this was the problem for me:

1. I had the .htaccess file on the correct xenforo folder
2. mod_rewrite was already enabled

There was one more thing to get things to work:
I had to edit this file:
/etc/apache2/sites-available/default

Find the following
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all

and change it to

Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all

and finally restart Apache
/etc/init.d/apache2 restart

Source:
http://www.lavluda.com/2007/07/15/how-to-enable-mod_rewrite-in-apache22-debian/
 
#4
I think there is a bug or something...

I was editing the .htaccess on the www root folder to protect Xenforo's admin.php using .htpasswd. Had some problems getting the password to be recognized, so I decided to revert back the admin.php without .htpasswd protection. I changed the .htaccess back to the previous configuration and restarted apache.

Then all I'm getting is blank pages (like on the first post). Just blank pages. I went back and double check everything, still blank pages. Plain white blank pages. Googled every possible phrases related to mod_rewrite, blank pages, xenforo, url rewrite, didn't find any solution. The only problem quoted by the articles is that if mod_rewrite is not there, then you will get blank pages. But I have mod_rewrite loaded and confirmed on the php info page.

Restarted the server, apache multiple times, dismounted mod_rewrite, mounted mod_rewrite back on, still nothing.

Any clue? I'm desperate. The forum was running fine this three days until this happened.
 

Jake Bunce

XenForo moderator
Staff member
#5
Do other web pages load besides the forum?

A blank page is often a suppressed error. Try adding this line to your library/config.php file to see if that reveals any specific error message on the blank page:

Code:
ini_set('display_errors', true);
 
#6
Thanks, Jake.. believe me or not it takes me less time (~50 mins) to reinstall my VPS, start with a clean machine, reinstall everything and restore Xenforo (through phpmyadmin) than trying to troubleshoot this (~3hours with no results).
 

Cory Booth

Well-known member
#7
For an issue I thought I'd share - I had trouble with a url /forms it reported 404
Turns out I had a forms.htm file which caused the problem.