So, apparently the problem I described in
http://forum.cmsmadesimple.org/viewtopi ... 28&t=55614
"does not exist with CMSMS" even though I am using the exact htaccess code included in /doc.
Not so.
Research for me what the solution is so that the query string is not appended at the end of the redirect path, and I will pay for your work. No bids above $20 please.
Oh and by the way, why am I always the only one pointing out a problem every one else is having? Tell me that's not the case.
Will pay for proper htaccess redirect solution
Re: Will pay for proper htaccess redirect solution
The file I am using is:
Code: Select all
AddType x-mapp-php5 .php
Options +FollowSymLinks
Options -Indexes
ServerSignature Off
redirect 301 /Firefox_downloading_MKRD_IP.html http://mkrd.info/?page=2-files-limit-fix
redirect 301 /antichrist http://mkrd.info/?page=vozvraschenie-antihrista-i-novyj-mirovoj-poryadok
redirect 301 /electronics-as-a-hobby http://wiki.mkrd.info/Electronics_as_a_Hobby_portal
redirect 301 /smf/index.php http://forum.mkrd.info/
#RedirectMatch permanent ^/linux/the-linux-distro.html http://wiki.mkrd.info/The_only_Linux_distribution_(distro)
RewriteRule ^/linux/switching-to-linux.html http://wiki.mkrd.info/Switching_to_Linux? [R=301,L]
redirect gone /services-available/repair-website-or-server-infection/be-careful-about-others-fixes.html
ErrorDocument 410 /error404.html
RewriteCond %{HTTP_USER_AGENT} !FeedBurner
RewriteRule ^feeds/news.rss$ http://feeds.feedburner.com/MKRDinfo_RSSFeed [R,L]
# Deny access to config.php
# This can be useful if php ever breaks or dies
# Use with caution, this may break other functions of CMSms that use a config.php
# file. This may also break other programs you have running under your CMSms
# install that use config.php. You may need to add another .htaccess file to those
# directories to specifically allow config.php.
<Files "config.php">
order allow,deny
deny from all
</Files>
<IfModule mod_rewrite.c>
RewriteEngine on
#
#Sub-dir e.g: /cmsms/
RewriteBase /
# URL Filtering helps stop some hack attempts
#IF the URI contains a "http:"
RewriteCond %{QUERY_STRING} http\: [OR]
#OR if the URI contains a "["
RewriteCond %{QUERY_STRING} \[ [OR]
#OR if the URI contains a "]"
RewriteCond %{QUERY_STRING} \] [OR]
#OR if the URI contains a "<__script__>"
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
#OR script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
#OR any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^.*$ - [F,L]
# END Filtering
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# but ignore POST requests.
#RewriteCond %{REQUEST_URI} !/$
#RewriteCond %{REQUEST_URI} !\.
#RewriteCond %{REQUEST_METHOD} !POST$
#RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
</IfModule>
<IfModule mod_header.c>
# Disable ETags
Header unset ETag
FileEtag None
</IfModule>
<IfModule mod_deflate.c>
# Compress css, plaintext, xml, gif, and images in transport.
AddOutputFilterByType DEFLATE text/css text/plain text/xml image/gif image/jpeg image/png
</IfModule>
<IfModule mod_expires.c>
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
# Set expires tags on various files... so that the browser wont attempt to reload them.
ExpiresActive On
ExpiresDefault "access plus 1 year"
<IfModule mod_header.c>
# Setting cache control to public allowes proxy servers to cache the items too.
Header set Cache-Control "public"
</IfModule>
</FilesMatch>
</IfModule>
Re: Will pay for proper htaccess redirect solution
I have left several examples in the file above.
As you can see, I have tried other redirect methods as well. If you will be trying this on your own, remember to clear cmsms and browser cache, press ctrl+F5, and reenter your query after each htaccess change.
Code: Select all
1) Redirect 301 /path http://my_domain/?page=query [b]works[/b]
2) Redirect 301 /path http://my_domain/redirectpath.html does not work as "path" gets appended to "redirect path"
3) Redirect 301 /path http://someone_elses_domain/ [b]does not work at all, and leads to their 404 page[/b].