Aldoseri
To get short URL to work open .htaccess located in your website's root document
Select All, then delete everything.
Paste the following code
# START PHPfox Rewrite
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^static/ajax.php index.php
RewriteRule ^themes/default/(.*) PF.Base/theme/default/$1
RewriteRule ^(file|static|theme|module)/(.*) PF.Base/$1/$2
RewriteRule ^(Apps|themes)/(.*) PF.Site/$1/$2
RewriteRule ^file/pic/photo/(.*).(.*)$ static/image.php?file=$1&ext=$2
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) /index.php/$2
</IfModule>
# END PHPfox Rewrite
This should solve your problems and make flowers blossom in your heart.
I guess this is true only if you're upgrading from V3.xx to V4 as the old .htaccess has all the old info which miss things up.
It took me an hour to discover this. Most threads blame it on mod_rewrite which is not a problem if you're not on nGinX or the sort.
In short, just paste the code in a clean .htacces file.
Regards
Be the first person to like this.
Donna(data66)
To get short URL to work open .htaccess located in your website's root document
Select All, then delete everything.
Paste the following code
# START PHPfox Rewrite
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^static/ajax.php index.php
RewriteRule ^themes/default/(.*) PF.Base/theme/default/$1
RewriteRule ^(file|static|theme|module)/(.*) PF.Base/$1/$2
RewriteRule ^(Apps|themes)/(.*) PF.Site/$1/$2
RewriteRule ^file/pic/photo/(.*).(.*)$ static/image.php?file=$1&ext=$2
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) /index.php/$2
</IfModule>
# END PHPfox Rewrite
This should solve your problems and make flowers blossom in your heart.
I guess this is true only if you're upgrading from V3.xx to V4 as the old .htaccess has all the old info which miss things up.
It took me an hour to discover this. Most threads blame it on mod_rewrite which is not a problem if you're not on nGinX or the sort.
In short, just paste the code in a clean .htacces file.
Regards
This was addressed in the other threads that the old .htaccess wouldn't work but thanks for posting it again.
Be the first person to like this.
That helped but still have index.php in all the links. For instance, domain.com/index.php or domain.com/index.php/forum
Be the first person to like this.
Donna(data66)
That helped but still have index.php in all the links. For instance, domain.com/index.php or domain.com/index.php/forum
please click documentation on the left and see the one for enabling short urls. It should be in the monetization and seo section since it can help with seo.
Be the first person to like this.
Have done that several times. Tried different things I've found on here. Keep getting this:
The /.htaccess file seems to be missing our Rewrite rules or this server does not support Mod_Rewrite.
Worked fine on V3, seems not to work on V4
Thanks!
Be the first person to like this.
Gatsby
Have done that several times. Tried different things I've found on here. Keep getting this:
The /.htaccess file seems to be missing our Rewrite rules or this server does not support Mod_Rewrite.
Worked fine on V3, seems not to work on V4
Thanks!
If V3 and V4 are on the same server and it worked for V3, then mod_rewrite is enabled. If not, you can do some simple rewrite tests in htaccess to verify (consult any htaccess guide online for howto), or ask you host.
Last update on June 18, 2016 by Gatsby.
Be the first person to like this.
WLongdonStudio
move to http://www.phpfoxsolutions.com
If V3 and V4 are on the same server and it worked for V3, then mod_rewrite is enabled. If not, you can do some simple rewrite tests in htaccess to verify (consult any htaccess guide online for howto), or ask you host.
Be the first person to like this.
If you use Apache and have access to your root files, you may need to edit your httpd.conf to allow mod rewrite. It's normally stored here: /etc/httpd/conf/httpd.conf You will need to change instances of: AllowOverride None to AllowOverride All
You'll find it in 3 places. Be careful, make a backup!
In my .htaccess I put this and it solved the problem. Mine is slightly different than above:
# START PHPfox Rewrite
Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(file)/(.*) PF.Base/$1/$2
RewriteRule ^static/ajax.php index.php
RewriteRule ^themes/default/(.*) PF.Base/theme/default/$1
RewriteRule ^(static|theme|module)/(.*) PF.Base/$1/$2
RewriteRule ^(Apps|themes)/(.*) PF.Site/$1/$2
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php/$1
</IfModule>
# END PHPfox Rewrite
I also found a login issue when the site came up WITHOUT the WWW in the domain. To force the WWW into the URL, I added this just before the #END PHPFox Rewrite:
RewriteCond %{HTTP_HOST} !^www.mydomain.com$ [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [L,R=301]
Hope it helps :)
Last update on June 26, 2016 by Gatsby.
Gatsby
If you use Apache and have access to your root files, you may need to edit your httpd.conf to allow mod rewrite. It's normally stored here: /etc/httpd/conf/httpd.conf You will need to change instances of: AllowOverride None to AllowOverride All
You'll find it in 3 places. Be careful, make a backup!
In my .htaccess I put this and it solved the problem. Mine is slightly different than above:
# START PHPfox Rewrite
Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(file)/(.*) PF.Base/$1/$2
RewriteRule ^static/ajax.php index.php
RewriteRule ^themes/default/(.*) PF.Base/theme/default/$1
RewriteRule ^(static|theme|module)/(.*) PF.Base/$1/$2
RewriteRule ^(Apps|themes)/(.*) PF.Site/$1/$2
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php/$1
</IfModule>
# END PHPfox Rewrite
I also found a login issue when the site came up WITHOUT the WWW in the domain. To force the WWW into the URL, I added this just before the #END PHPFox Rewrite:
RewriteCond %{HTTP_HOST} !^www.mydomain.com$ [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [L,R=301]
Hope it helps :)
Thanks for the info. You should get in the habit of encapsulating code between code tags. Even for htaccess code.
I fixed it for you this time.
Last update on June 26, 2016 by Gatsby.
Donna(data66)
If you use Apache and have access to your root files, you may need to edit your httpd.conf to allow mod rewrite. It's normally stored here: /etc/httpd/conf/httpd.conf You will need to change instances of: AllowOverride None to AllowOverride All
You'll find it in 3 places. Be careful, make a backup!
In my .htaccess I put this and it solved the problem. Mine is slightly different than above:
# START PHPfox Rewrite
Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(file)/(.*) PF.Base/$1/$2
RewriteRule ^static/ajax.php index.php
RewriteRule ^themes/default/(.*) PF.Base/theme/default/$1
RewriteRule ^(static|theme|module)/(.*) PF.Base/$1/$2
RewriteRule ^(Apps|themes)/(.*) PF.Site/$1/$2
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php/$1
</IfModule>
# END PHPfox Rewrite
I also found a login issue when the site came up WITHOUT the WWW in the domain. To force the WWW into the URL, I added this just before the #END PHPFox Rewrite:
RewriteCond %{HTTP_HOST} !^www.mydomain.com$ [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [L,R=301]
Hope it helps :)
Thanks for your tips. I actually do it the other way, I force it to the non-www for better seo and faster performance.
Be the first person to like this.
Yes, that's what I read. For some reason I can't login without the WWW. Not sure why.
Thanks for your tips. I actually do it the other way, I force it to the non-www for better seo and faster performance.
Be the first person to like this.
Thanks! Will try and do better next time :)
Thanks for the info. You should get in the habit of encapsulating code between code tags. Even for htaccess code.
I fixed it for you this time.
Be the first person to like this.