Username
Forgot password?
Welcome to our site!
Or Join with FTTF

URL Rewrite issues

0

506 views
I was able to get everything installed and working using Apache with fcgi and I have lampcms installed in subdir: http://www.myautopod.com/questions. However, URL rewrites are not working properly for me. I have .htaccess in the 'questions' folder. In the config file, if I set FILE= (nothing) I get the home page but no sub-links work. If I leave FILE=index.php, then everything works BUT the URLS all have index.php in them. http://www.myautopod.com/questio...php/unanswered/ (If I leave 'FILE=' this still works, but index.php is removed from the hyperlinks; as I'm sure you know.) I tried some variations to no avail.

Here is what I have in .htaccess. I had to add the other two conditions (line 3 & 4) otherwise it didn't work at all.
RewriteEngine on
RewriteCond $1 !^(index\.php|(.+)\.(css|js|png|gif|jpg|jpeg|txt))
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1

I appreciate any assistance insight. Huge props on this thing -- really nice work
 
asked November 15, 2013 at 8:01 AM

 us

1 Answer

0
 
I was able to get things working. I think the problem has something to do with the fact that my server is Apache 2.2.x. I think this would work within the .htaccess file but I put it in my httpd.conf file. On my server each virtual has it's own httpd.conf so I put this inside of <directory>

<Directory /path/to/home/mysite/public_html/questions>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|(.+)\.(css|js|png|gif|jpg|jpeg|txt))
RewriteRule .* index.php?/$1 [PT,L,QSA]
</Directory>
flag
answered November 15, 2013 at 4:31 PM

Your answer

Join with account you already have

FTTF

Preview

Alert