.htaccess and SocialEngine 4

Connect with other users about what to run on your webhosting (and how to run it) here.
Post Reply
mainmanc
New to forums
New to forums
Posts: 2
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Wed Apr 06, 2011 10:38 am

.htaccess and SocialEngine 4

Post by mainmanc »

Hi,

I am testing an install of SE4 -- which will eventually move to VPS -- but have run into an issue regarding the .htaccess file (which admittedly I know less than I should about). Any help appreciated.

Here are the default .htaccess file contents:

Code: Select all

# $Id: .htaccess 7539 2010-10-04 04:41:38Z john $

<IfModule mod_rewrite.c>
  Options +FollowSymLinks
  RewriteEngine On
  RewriteBase /

  # Get rid of index.php
  RewriteCond %{REQUEST_URI} /index\.php
  RewriteRule (.*) index.php?rewrite=2 [L,QSA]

  # Rewrite all directory-looking urls
  RewriteCond %{REQUEST_URI} /$
  RewriteRule (.*) index.php?rewrite=1 [L,QSA]

  # Try to route missing files
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} public\/ [OR]
  RewriteCond %{REQUEST_FILENAME} \.(jpg|gif|png|ico|flv|htm|html|php|css|js)$
  RewriteRule . - [L]
  
  # If the file doesn't exist, rewrite to index
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?rewrite=1 [L,QSA]

</IfModule>

# sends requests /index.php/path/to/module/ to "index.php"
# AcceptPathInfo On

# @todo This may not be effective in some cases
FileETag Size
But it's not doing what it's supposed to. Most of the site does work if I remove the file, but not everything. To confirm the .htaccess is valid, I have tried this on a VPS as-is and it seems to work perfectly. Anything obvious that I should be doing differently for shared hosting? 8O

Thanks in advance.
User avatar
Edge100x
Founder
Founder
Posts: 13117
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: .htaccess and SocialEngine 4

Post by Edge100x »

I'm not seeing anything obviously wrong here, and the server does have mod_rewrite support. When you try to visit a broken page, where does it redirect you?
mainmanc
New to forums
New to forums
Posts: 2
Joined: Wed Apr 06, 2011 10:38 am

Re: .htaccess and SocialEngine 4

Post by mainmanc »

Yeah it seems strange. I've looked at the .htaccess on the VPS again and they seem identical. I am not sure if this helps but...

With the .htaccess removed the url in the browser looks like:

http://www.domain.com/index.php/music

Which works fine of course.

When the .htaccess is enabled the url looks like:

http://www.domain.com/music

Which does not work and shows (in Chrome) "Oops! This link appears to be broken."

I'm assuming the rewrite is trying to rewrite to "www.domain.com/music/index.php" but seems to be failing. Any ideas? Is there anything else I can provide to help?

Cheers.
Post Reply