Answer the question
In order to leave comments, you need to log in
Where should I put the form code?
Where to insert the form code for placing a banner on wordpress?
Answer the question
In order to leave comments, you need to log in
Hello! It would be nice to clarify. What is form? Is it form?
Or is it a banner placement code (a certain block, such as a div) or an iframe in general?
And you can add a block to the site in different ways. For example, use the html widget and paste your code there.
Or you use the Visual Composer visual editor (that is, it has an html widget). Perhaps there are similar widgets in other editors.
Well, or add at the code (template) level. Or create your own shortcode in functions.php, and display it already on the site
https://www.donatstudios.com/RewriteRule_Generator
she can do both redirects with get and without get,
the only thing she can't do is redirect to a url with get, because trans ? does not put \? , but it can be done by hand.
Now I follow.
It should be the default.
but there are a few more exceptions than it seems.
################################################### ##########################
#### Remove repeated slashes (/) from URL ####
######## ################################################### ##################
RewriteCond %{THE_REQUEST} //
RewriteRule .* /$0 [R=301,L]
############# ################################################### #############
#### Remove slashes at the end of the URL for static files (contains a period) ####
############################## ##############################################
RewriteCond %{REQUEST_URI } \..+$
# If the file contains a dot.
RewriteCond %{REQUEST_FILENAME} !-d
# And it's not a directory.
RewriteCond %{REQUEST_FILENAME} -f
# Is a file.
RewriteCond %{REQUEST_URI} ^(.+)/$
# And there is a slash at the end of the URL.
RewriteRule ^(.+)/$ /$1 [R=301,L]
# Remove slashes.
################################################### ##########################
#### Add a slash(/) if there is none and it is not a file. ####
################################################### ##########################
RewriteCond %{REQUEST_URI} !(.*)/$
# If there is no trailing slash.
RewriteCond %{REQUEST_FILENAME} !-f
# Not a file.
RewriteCond %{REQUEST_URI} !\..+$
# No dot in URL (file).
RewriteRule ^(.*)$ $1/ [L,R=301]
# Add a trailing slash.
################################################### ##########################
#### Remove index.php if it is at the end of the URL ####
##### ################################################### #####################
RewriteCond %{REQUEST_METHOD} =GET
# Detect GET request in URL (not POST).
RewriteCond %{REQUEST_URI} ^(.*)/index\.php$
# URL contains index.php at the end.
RewriteRule ^(.*)$ %1/ [R=301,L]
# Remove index.php from URL.
############################################################################
#### Компрессия статического контента для гугл спид тест ####
############################################################################
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE image/svg+xml
</IfModule>
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType image/jpeg "access plus 3 day"
ExpiresByType image/svg "access plus 3 day"
ExpiresByType image/gif "access plus 3 day"
ExpiresByType image/png "access plus 3 day"
ExpiresByType text/javascript "access plus 3 day"
ExpiresByType text/css "access plus 3 day"
ExpiresByType application/javascript "access plus 3 day"
</IfModule>
I don't know how correct this is, but I did it like this:
RewriteCond %{REQUEST_URI} ^/catalog\/([a-zA-Z0-9_-]+)\/([a-zA-Z0-9_-]+) \/?$
RewriteRule ^catalog\/([a-zA-Z0-9_-]+)\/([a-zA-Z0-9_-]+)\/?$ $2.html? [R=301,L]
RewriteCond %{REQUEST_URI} ^/catalog\/([a-zA-Z0-9_-]+)\/?$
RewriteRule ^catalog\/([a-zA-Z0-9_-] +)\/?$ $1.html? [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question