Hello, I am looking for someone to help me setup friendly URLs for my website. Message me if you can do this for me. Would like it for a VC or free.
# Mod_security can interfere with uploading of content such as attachments. If you
# cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
# SecFilterEngine Off
# SecFilterScanPOST Off
#</IfModule>
ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 405 default
ErrorDocument 406 default
ErrorDocument 500 default
ErrorDocument 501 default
ErrorDocument 503 default
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#RewriteCond %{SERVER_PORT} 80
#RewriteRule ^(.*)$ https://www.google.com/$1 [R,L]
# If you are having problems with the rewrite rules, remove the "#" from the
# line that begins "RewriteBase" below. You will also have to change the path
# of the rewrite to reflect the path to your XenForo installation.
#RewriteBase /xenforo
# This line may be needed to enable WebDAV editing with PHP as a CGI.
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
RewriteCond %{HTTP_REFERER} !^http://google.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://google.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.google.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.google.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://google.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://google.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.google.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.google.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://google.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://google.com$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php56” package as the default “PHP” programming language.
<IfModule mime_module>
AddType application/x-httpd-ea-php56 .php .php5 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
<IfModule php5_module>
php_flag asp_tags Off
php_flag display_errors Off
php_value max_execution_time 30
php_value max_input_time 60
php_value max_input_vars 1000
php_value memory_limit 156M
php_value post_max_size 18M
php_value session.gc_maxlifetime 1440
php_value session.save_path "/var/cpanel/php/sessions/ea-php56"
php_value upload_max_filesize 15M
php_flag zlib.output_compression Off
</IfModule>
# END cPanel-generated php ini directives, do not edit
I am not using cPanel. I am using Ubuntu 18.04 VPSEdit .htaccess, put the following in, just obviously change google.com to your domain:
Code:# Mod_security can interfere with uploading of content such as attachments. If you # cannot attach files, remove the "#" from the lines below. #<IfModule mod_security.c> # SecFilterEngine Off # SecFilterScanPOST Off #</IfModule> ErrorDocument 401 default ErrorDocument 403 default ErrorDocument 404 default ErrorDocument 405 default ErrorDocument 406 default ErrorDocument 500 default ErrorDocument 501 default ErrorDocument 503 default <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] #RewriteCond %{SERVER_PORT} 80 #RewriteRule ^(.*)$ https://www.google.com/$1 [R,L] # If you are having problems with the rewrite rules, remove the "#" from the # line that begins "RewriteBase" below. You will also have to change the path # of the rewrite to reflect the path to your XenForo installation. #RewriteBase /xenforo # This line may be needed to enable WebDAV editing with PHP as a CGI. #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L] RewriteRule ^.*$ index.php [NC,L] </IfModule> RewriteCond %{HTTP_REFERER} !^http://google.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://google.com$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.google.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.google.com$ [NC] RewriteCond %{HTTP_REFERER} !^https://google.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^https://google.com$ [NC] RewriteCond %{HTTP_REFERER} !^https://www.google.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^https://www.google.com$ [NC] RewriteCond %{HTTP_REFERER} !^https://google.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^https://google.com$ [NC] RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC] # php -- BEGIN cPanel-generated handler, do not edit # Set the “ea-php56” package as the default “PHP” programming language. <IfModule mime_module> AddType application/x-httpd-ea-php56 .php .php5 .phtml </IfModule> # php -- END cPanel-generated handler, do not edit # BEGIN cPanel-generated php ini directives, do not edit # Manual editing of this file may result in unexpected behavior. # To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor) # For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI) <IfModule php5_module> php_flag asp_tags Off php_flag display_errors Off php_value max_execution_time 30 php_value max_input_time 60 php_value max_input_vars 1000 php_value memory_limit 156M php_value post_max_size 18M php_value session.gc_maxlifetime 1440 php_value session.save_path "/var/cpanel/php/sessions/ea-php56" php_value upload_max_filesize 15M php_flag zlib.output_compression Off </IfModule> # END cPanel-generated php ini directives, do not edit
It usually doesn't work correctly if you don't have some specific settings set. It might look like it work but links etc. might be brokenOr you just enable the feature via xenforo admin panel.
Go to options and then Search Engine Optimization. There's the option.
I am not using cPanel though...It usually doesn't work correctly if you don't have some specific settings set. It might look like it work but links etc. might be broken
I did it already.[DOUBLEPOST=1555102943][/DOUBLEPOST]Still not working. Can anyone help?Enable it in XenForo settings.
Change htaccess.txt to .htaccess in your web host via FTP
It usually doesn't work correctly if you don't have some specific settings set. It might look like it work but links etc. might be broken
You might need to check if mod_rewrite is enabled. Assuming you're on ubuntu: https://hostadvice.com/how-to/how-t...e-on-an-ubuntu-18-04-vps-or-dedicated-server/I did it already.[DOUBLEPOST=1555102943][/DOUBLEPOST]Still not working. Can anyone help?
I just got it done. Thanks anyways!Can't relate. It's always worked for me.
You might need to check if mod_rewrite is enabled. Assuming you're on ubuntu: https://hostadvice.com/how-to/how-t...e-on-an-ubuntu-18-04-vps-or-dedicated-server/
