Server is ignoring slashes


 
Thread Tools Search this Thread
Special Forums Cybersecurity Server is ignoring slashes
# 1  
Old 01-11-2013
Server is ignoring slashes

When I try to access my website's Administrator page (mysite.com/administrator), I'm redirected to (mysite.comadministrator), as if the slash was removed from the URL

The funny thing is that I can access it if I enter 2 slashes (mysite.com//administrator)

Any ideas of what might be causing it?
# 2  
Old 01-11-2013
Very hard to tell without at least knowing what your webserver is.

It could be a bungled rewrite rule, I suppose.
# 3  
Old 01-11-2013
Quote:
Originally Posted by Corona688
Very hard to tell without at least knowing what your webserver is.

It could be a bungled rewrite rule, I suppose.
It's APACHE. Here's the .htaccess

Code:
RewriteCond %{HTTP_HOST} ^MYSITE.org$ [OR]
RewriteCond %{HTTP_HOST} ^www.MYSITE.org$ [OR]
RewriteCond %{HTTP_HOST} ^MYSITE.com$
RewriteRule ^(.*)$ "http\:\/\/www\.MYSITE\.com$1" [R=301,L]

<IfModule mod_suphp.c>
# To set your custom php.ini, add the following line to this file:
suPHP_ConfigPath /home/online78/public_html
</IfModule>

##
# @version $Id: htaccess.txt 13415 2009-11-03 15:53:25Z ian $
# @package Joomla
# @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##

RewriteCond %{QUERY_STRING} ^((([^&]+&)*([^&]+)+)&)?fb_xd_fragment
RewriteRule (.*) http://www.MYSITE.com/$1?%2 [R=301,L]

#####################################################
#  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
#
#####################################################

##  Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
#  mod_rewrite in use

RewriteEngine On

RewriteRule ^about/?$ /free [R=301,L]
RewriteRule ^design/?$ /free [R=301,L]
RewriteRule ^free-logo-maker/?$ /free [R=301,L]
RewriteRule ^custom/?$ /free [R=301,L]
RewriteRule ^premium/?$ /free [R=301,L]
RewriteRule ^modal_saving/?$ /free [R=301,L]
RewriteRule ^thankyou/?$ /free [R=301,L]
RewriteRule ^free-premium/?$ /free [R=301,L]

#RewriteRule ^premium/?$ /components/com_validator/pay.php [L]
#RewriteRule ^premium/?$ /pay.php [L]
#RewriteRule ^modal_saving/?$ /modal_saving.html [L]
#RewriteRule ^thankyou/?$ "http://www.MYSITE.com/index.php?option=com_content&view=article&id=54" [L]
#RewriteRule ^free-premium/?$ "http://www.MYSITE.com/index.php?option=com_account&view=thankyou&txn_id=CLG" [L]

########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
## Deny access to extension xml files (uncomment out to activate)
#<Files ~ "\.xml$">
#Order allow,deny
#Deny from all
#Satisfy all
#</Files>
## End of deny access to extension xml files
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits

#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update Your Joomla! Directory (just / for root)

# RewriteBase /

########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$  [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section
#<IfModule mod_expires.c>
#    ExpiresActive On
#    ExpiresDefault "access plus 1 year"
#</IfModule>
#CACHE
#<IfModule mod_headers.c>
#Header unset ETag
#Header unset Last-Modified
#</IfModule>
#FileETag None
#<FilesMatch "\.(ico|gz|JPG|jpg|jpeg|png|gif|js|css|swf)$">
#Header unset Cache-control
#Header set Expires "Wed, 28 Apr 2013 20:00:00 GMT"
#Header set Cache-Control "public"
#</FilesMatch>
#Gzip
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x- javascript application/javascript
</ifmodule>
#End Gzip

# 4  
Old 01-11-2013
I think I see it.

Code:
RewriteRule ^(.*)$ "http\:\/\/www\.MYSITE\.com$1" [R=301,L]

Code:
RewriteRule ^(.*)$ "http\:\/\/www\.MYSITE\.com/$1" [R=301,L]

This User Gave Thanks to Corona688 For This Post:
# 5  
Old 01-11-2013
Wow, that was fast!
Thank you Corona688
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Print slashes using C

I want to print 4052 slashes using this C program. #include <stdio.h> void main() { int i; for (i=0; i<4052; i++) printf ("/"); } When i compile this via gcc am getting this error : http://gyazo.com/e0403e4789575d181d1695f9db3e6d6e.png Can anyone point out what am doing wrong? (15 Replies)
Discussion started by: vish6251
15 Replies

2. Shell Programming and Scripting

Need to extract the data between slashes

I have got the following contents and please can you advise me on how to extract the following data that appears between the very first slashes. Thanks i.e 576 , 10000, 1299 3/576/GPP///////NONE/0 50/10000/GPP///D4////GPP/0 234/1299/GPP///////NONE/0 (3 Replies)
Discussion started by: Sudhakar333
3 Replies

3. Shell Programming and Scripting

How to use sed when a match has forward slashes

I'm trying to replace an alias with its match using sed but the match contains forward slashs so it causes the sed command to throw a garbled message.. cmd_list.txt sample AIX_myserver_1011_vintella.sudoers_cmndalias sample I'm trying to use the below but like I say it throws a... (5 Replies)
Discussion started by: Jazmania
5 Replies

4. Shell Programming and Scripting

sed - how to remove trailing slashes

I know you can remove trialing slashes using: #echo "/tmp/one/two/three////" | sed "s,/$,," /tmp/one/two/three/// But I want to know how to make it remove all trialing flashes in the front, and in the start, so the end result is: tmp/one/two/three Anyone have any idea how to do this... (6 Replies)
Discussion started by: EXT3FSCK
6 Replies

5. Shell Programming and Scripting

search replace pattern containing slashes

Need help in finding pattern then replacing pattern that contains multiple slashes .. ex . <imgp src="Attention_web.eps.jpg" align="left"> <imgp src="NewToday062308.eps.jpg"> replace with <imgp src="/ww2/adpay/liner/Attention_web.eps.jpg" align="left"> <imgp... (2 Replies)
Discussion started by: aveitas
2 Replies

6. UNIX for Dummies Questions & Answers

dots and slashes

when I execute a command in like "run.sh," I can run it two ways: ./run.sh or . run.sh What is the difference? (1 Reply)
Discussion started by: DarkLord
1 Replies

7. UNIX for Dummies Questions & Answers

sed command for using with back slashes

hi all, im trying to use a sed command to remove all occurenes of \p\g what i used so far is : sed 's!\p\g!!g' file but this doesnt work ? Any ideas, thanks for helping. (2 Replies)
Discussion started by: seaten
2 Replies

8. UNIX for Dummies Questions & Answers

Password slashes.

Hi everyone! :) I've been asked to write an article breaking down the basics of UNIX password information etc., and I've come across something in which I cannot find a definition for within Google. Very simply, can anyone tell me what the difference is between a standard UNIX password, and... (4 Replies)
Discussion started by: hellz
4 Replies

9. Shell Programming and Scripting

slashes in a bash shell

Substituting the / for the \ I came up with this: sed s/\\\\usr\\\\qm/\\\\\\\\qmi/g Can anyone explain to me please, why I have to pass the slash four times? :confused: (2 Replies)
Discussion started by: Shakey21
2 Replies

10. UNIX for Dummies Questions & Answers

UNIX and forward slashes

Hey, This is probably going to sound like an immensely stupid and dull question, but can someone please tell me whether the forward slash on the web address (http://) signifies that it is running on UNIX? hanks (1 Reply)
Discussion started by: steverocliffe
1 Replies
Login or Register to Ask a Question