Forum Moderators: phranque
xxx-xxx-xxx-video.htmlis served by
videos.phpwhere the .htaccess make difference based on -video.html and so on.
RewriteRule ^(.*)-video.html$ videos.php?video=$1 [NC]
xxx-xxx-xxxpage without marker and extension and the other kind of pages will stay intact.
RewriteRule ^categorie.html$ catlist.phpwill stay the same, so just kind of pages above need to be served on the mentioned way.
Options -Indexes
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
<Files .htaccess>
Order Deny,Allow
Deny from all
</Files>
AddType application/x-httpd-php .html
#
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^www\.(.+) [NC]
RewriteRule ^(.*) http://%1/$1 [R=301,NE,L]
#
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC]
RewriteCond %{QUERY_STRING} (\;|\'|\"|\%22).*(union|insert|where|select|update|drop|md5|or|and|if).* [NC]
RewriteRule ^(.*)$ 404.html [NC]
RewriteRule (,|;|<|>|'|`) 404.html [NC]
#
RewriteRule ^(.*)-video.html$ videos.php?video=$1 [NC]
RewriteRule ^categorie.html$ catlist.php
----
#
ErrorDocument 404 /config.php?action=p404
I need to serve
xxx-xxx-xxx
page
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC]
RewriteCond %{QUERY_STRING} (\;|\'|\"|\%22).*(union|insert|where|select|update|drop|md5|or|and|if).* [NC]
...
RewriteRule (,|;|<|>|'|`) 404.html [NC]
xxx, xxx-numbers, numbers-xxx, xxx-xxx-xxx, so it could be letters & numbers combination or just letters, it should be served by videos.php.
categorie, that should be served by catlist.php.
Options -Indexes
Options +FollowSymlinks
RewriteBase /
<Files .htaccess>
Order Deny,Allow
Deny from all
</Files>
AddType application/x-httpd-php .html
# Redirect www urls to non-www
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule (.*) http://example.com/$1 [R=301,L]
#
RewriteRule ([,;<>'`]) 404.html [L]
#
RewriteRule ^(.*)-video.html$ videos.php?video=$1 [NC,L]
RewriteRule ^categorie.html$ catlist.php [NC,L]
#
ErrorDocument 404 /config.php?action=p404
RewriteRule ^([\w\-]+)$ videos.php?video=$1 [NC,L]
Options -Indexes
Options +FollowSymlinks
RewriteBase /
<Files .htaccess>
Order Deny,Allow
Deny from all
</Files>
AddType application/x-httpd-php .html
# Redirect www urls to non-www
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule (.*) http://example.com/$1 [R=301,L]
#
RewriteRule ([,;<>'`]) 404.html [L]
#
RewriteRule ^([\w\-]+)$ videos.php?video=$1 [NC,L]
RewriteRule ^categorie.html$ catlist.php [NC,L]
RewriteRule ^choice.html$ choice.php [NC,L]
#
ErrorDocument 404 /config.php?action=p404