Today's Messages (off)  | Unanswered Messages (on)

Forum: Htaccess Questions
 Topic: Hiding folder directory
icon5.gif  Hiding folder directory [message #2949] Fri, 15 July 2011 03:45
Arculos  is currently offline Arculos
Messages: 1
Registered: July 2011
Location: UK
I have a folder or folders I would like to hide, I've googled around for folder cloaking / hiding with no working result.

The current url setup
http://www.arculos.com/url-docs/portfolio/arculos-hub.php

Im trying to hide the "URL-docs" and if possible the "portfolio"
section of the url as well so I am left with either...

http://www.arculos.com/arculos-hub.php
orhttp://www.arculos.com/portfolio/arculos-hub.php

The current HTACCESS setup is shown below
# Hidden Folder Directories
#Url-docs
RewriteEngine on
RewriteRule ^/$ /url-docs/
 Topic: help!
help! [message #2933] Wed, 13 July 2011 23:45
rockuuu  is currently offline rockuuu
Messages: 1
Registered: July 2011
Hey Guys:
i need help please in htaccess
i have a very simple HTML design with simple PHP conatct us form , when i fill the form and hit the Submit button i get the Error 403 access forbidden
i googled this i make more than 20 script for htaccess file BUT not a single one make it work

i have no idea about it , would u please help me out here i would really apprciated it

i will post the HTML and PHP script :
Code:

<?php
$errors = '';
$myemail = '*****@****.com';
if(empty($_POST['name']) ||
empty($_POST['email']) ||
empty($_POST['message']))
{
$errors .= "\n Error: all fields are required";
}

$name = $_POST['name'];
$email_address = $_POST['email'];
$message = $_POST['message'];

if (!preg_match(
" /^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a -z]{2,3})$/i ",
$email_address))
{
$errors .= "\n Error: Invalid email address";
}

if( empty($errors))
{
$to = $myemail;
$email_subject = "Contact form submission: $name";
$email_body = "You have received a new message. ".
" Here are the details:\n Name: $name \n Email: $email_address \n Message \n $message";

$headers = "From: $myemail\n";
$headers .= "Reply-To: $email_address";

mail($to,$email_subject,$email_body,$headers);
//redirect to the 'thank you' page
header('Location: contact-form-thank-you.html');
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Contact form handler</title>
</head>

<body>
<!-- This page is displayed only if there is some error -->
<?php
echo nl2br($errors);
?>


</body>
</html>

the htaccess file is (i tried too many scripts this what is in it NOW)


<Directory />
Allowoverride All
</Directory>

<Location />
Options +IncludesNoExec -ExecCGI
</Location>


the html form

Code:

<form method="POST" name="contactform" action="contact-form-handler.php">
<p>
<label for='name'>Your Name:</label> <br>
<input type="text" name="name">
</p>
<p>
<label for='email'>Email Address:</label> <br>
<input type="text" name="email"> <br>
</p>
<p>
<label for='message'>Message:</label> <br>
<textarea name="message"></textarea>
</p>
<input type="submit" value="Submit"><br>
</form>



maybe in the backage i bought with the hosting i didnt select this kind of services , its from 1AND1 by the way, i really dont know

Best regards
 Topic: Joomla...subdomains
Joomla...subdomains [message #2932] Wed, 13 July 2011 21:14
fhhost  is currently offline fhhost
Messages: 1
Registered: July 2011
Location: yorkshire ,uk
Hi there,

Im very confused with htaccess, I have subdomains and I wish to install demo
and other items, but everytime I go to visit the install or index of the subdomain.

SUBDOMAIN.DOMAIN.COM

it redirects me to the main domain.

DOMAIN.COM

Here is the file code on the root.

##
# @version $Id: htaccess.txt 14401 2010-01-26 14:10:00Z louis $
# @package Joomla
# @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##


#####################################################
#  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

########## 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



kindest regards..

Jonathan
 Topic: Redirect then rewrite
Redirect then rewrite [message #2931] Wed, 13 July 2011 11:14
Sonofwan  is currently offline Sonofwan
Messages: 2
Registered: July 2011
Location: London
I've got long links to news articles www.xxxx.com/blah/blahblah=nice-seo-keywords-random# and for seo and human friendly reasons I shortened them using a rewriterule
RewriteRule ^news/(.*) /blah/blahblah=$1 [NC]

All good but what I'd also like to do is have a beer and kick back rather than go around the web and change all the old full links to canonicalise them. So I'm presuming - and stuck on - writing a redirect will do the trick..

Redirect 301 /blah/blahblah= http://www.xxxx.com/news/

Doesn't work.. Have tried putting the rewrite below and above the redirect.. Not sure if I'm barking up the right tree..

To explain my objective - I'd prefer the short links for future use and were viewable in the users address bar and by search engines, so any long links existing on the web will go to the right content but change the url to be the short one.

 Topic: Help with mod_rewrite!
Help with mod_rewrite! [message #2853] Thu, 07 July 2011 13:33
jayskates  is currently offline jayskates
Messages: 1
Registered: July 2011
Hi everyone,

I'm currently working on a pretty dynamic website... I'm trying to use htaccess to rewrite all the ugly urls into nice pretty ones!

I have the most basic rule working...

RewriteRule (.*)\.html$ index.php?p=$1

which is rewriting a url like
http://www.buschsystems.com/busch-new/index.php?p=Promotions

to
http://www.buschsystems.com/busch-new/Promitions.html


now here is where I'm stuck, I also want to rewrite url's that contain a second get variable,

Example:

http://www.buschsystems.com/busch-new/index.php?p=prod&name=Product Name

or
http://www.buschsystems.com/busch-new/index.php?p=About&subPage=Testimonials


How can I write these to be
http://www.buschsystems.com/busch-new/prod/Product Name.html

or
http://www.buschsystems.com/busch-new/About/testimonials.html


Any help would be greatly appreciated!! I have a deadline to meet (today) and would love to not miss it haha.

Thank you in advance!
 Topic: htaccess file please help
htaccess file please help [message #2828] Wed, 06 July 2011 18:35
dimvarlam  is currently offline dimvarlam
Messages: 1
Registered: July 2011
I've developed a site and need to make a rule for rewriting the url from:
www.my-site.com/pages/index.php?a=alpha&b=beta, to www.my-site.com/pages/alpha/beta/

I have already used an .htaccess file in folder "pages" but it keeps returning 500 internal error.

In the server's error I get:

[error] File does not exist: /home/my-site/public_html/500.shtml

[alert] /home/my-site/public_html/pages/.htaccess: Invalid command '{\\rtf1\\adeflang1033\\ansi\\ansicpg10000\\uc1\\adeff0\\def f0\\stshfdbch0\\stshfloch0\\stshfhich0\\stshfbi0\\deflang103 3\\deflangfe1033{\\upr{\\fonttbl{\\f0\\fnil\\fcharset0\\fprq 2{\\*\\panose', perhaps misspelled or defined by a module not included in the server configuration

The .htaccess file is as follows:

RewriteEngine On
RewriteBase /

RewriteRule ^([a-z]+)/([a-z]+)/$ index.php?a=$1&b=$2 [L]


Any help would be appreciated cause i'm stuck and unpaid for my work!!!

Thank's a lot in advance
 Topic: Is This A Forum For Making Questions?
Is This A Forum For Making Questions? [message #2811] Wed, 06 July 2011 07:03
storesonline  is currently offline storesonline
Messages: 2
Registered: July 2011
Location: USA
Please, look at my previous question I made about the htaccess and if you can answer it, I appreciate your interest.
In the other hand what is that all about games of golf?
 Topic: Moving forum to sub directory - htaccess help needed
Moving forum to sub directory - htaccess help needed [message #2770] Sun, 03 July 2011 16:33
crforum  is currently offline crforum
Messages: 1
Registered: July 2011
Location: India
Hello Folks,
I have a SMF forum installation at www.mydomian.com and I wish to move it to www.mydomain.com/forum and install wordpress at www.mydomain.com/
My challenge is the following:

I have thousands of Search Engine Listings. I need to redirect each page to the same pagein its new location at www.mydomain.com/forum. I have prettyurl installed and thus all the listings in Search Engines ends something like mydomain.com/category_name/page_name/. This means I may need some htaccess hack that will redirect visitors based upon what category their landing page exists inside. I don't have much knowledge of htaccess so I am requesting some expert help from you. I am sure this can be done.

Thanks for all the advice I can get here!
 Topic: How To tell The Search Engine To Ignore Files _vti_cnf Front Page?
icon10.gif  How To tell The Search Engine To Ignore Files _vti_cnf Front Page? [message #2767] Sun, 03 July 2011 00:17
storesonline  is currently offline storesonline
Messages: 2
Registered: July 2011
Location: USA
_vti_cnf. Does anyone knows? These are files that the program Frontpage creates and they should not be display or in cache, because they show errors in the webmaster reports, also it lowers the website ranking. too many errors are time consuming to fix one by one and maybe if you know how to tell these bots to ignore them? I appreciate it a lot.
 Topic: pretty url question
pretty url question [message #2666] Fri, 24 June 2011 04:52
minidawg  is currently offline minidawg
Messages: 1
Registered: June 2011
Location: Canada
I have an htaccess file that is supposed to make some particular URL's look better. Here is my code

Quote:
Options +FollowSymLinks
DirectoryIndex index.htm
RewriteEngine On

RewriteBase /myFolder
#
# Trailing slash check
# Don't fix direct file links
RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ $1/ [L,R=301]

#
# Finally, forward everything to your front-controller
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(main)/?$ home.php [L,NC]
RewriteRule ^(register)/?$ logreg.php [L,NC]


I also have
Quote:
<a base='../' target='_self' />

in my header.
so going to webname.com/main/ shows the home.php page, great! I played with it a bit, and got all the images, javascript, and ajax to work as well. Here's the catch: In Opera, Chrome, and FireFox all my images and javascript/ajax work. In IE9 it will only show images with full (http://www.webname.com/images/pic.png). Images with relative paths dont show up.. But they do in the other browsers..
I deleted my cache, cookies, etc etc. Restarted the browser and the computer, and nothing. Can someone here offer some insight as to why this isn't working very well?
 Topic: How to precede URLs using Apache or IIS.?
How to precede URLs using Apache or IIS.? [message #2664] Thu, 23 June 2011 14:28
accessmaster  is currently offline accessmaster
Messages: 2
Registered: June 2011
Hello. I want a particular directory to open as meh.domain.com rather than domain.com/meh. How do I do this using apache?
Also what is the .htaccess used for, and why isn't it on my computer? Thank you

Thanks!

------------
A lie can be halfway around the world before the truth gets its boots on.
my favorite blog:ipad 2 transfer

 Topic: Two problems with .htaccess with .htpasswd?
Two problems with .htaccess with .htpasswd? [message #2663] Thu, 23 June 2011 14:27
accessmaster  is currently offline accessmaster
Messages: 2
Registered: June 2011

I have GoDaddy and let it auto-make the .htaccess and .htpasswd (Via "Set Permissions"). I am setting the password for the folder with all the files for the webpage. Now, for the problems:

1. When I log in with my Macintosh (I tried it on FireFox and Chrome), I logged in, and I never needed to log in again, even though I said "Never save passwords for this site". Could it be the cache?

2. On my Windows Computer (Chrome), I need to enter my password a bajillion times. What do I do here?

Thanks!

------------
A lie can be halfway around the world before the truth gets its boots on.
my favorite blog:iPad Rumor
 Topic: redirect question
redirect question [message #2646] Tue, 21 June 2011 17:39
derevyan  is currently offline derevyan
Messages: 1
Registered: June 2011
Hello,

I am new to this topic but I have been battling with a redirect for some and quite frankly Im out of ideas.

I have a website and I wold like to permanently redirect some pages but I think Im having problems with the syntax.

I would like to redirect a few pages of the following format:

http://mysite/page1.html?i3 -> http://mysite/page1.html
without the ?i3 part.

here is what I have so far in the .htaccess:

RewriteEngine on
RewriteRule ^page1\.html([^&])$ page1.html [R=301]

I have tried quite a few versions of this, but nothing seems to work!

Please please help! What am i doing wrong?

Thank you in advance for your help!
 Topic: HT ACCESS redirect rule
HT ACCESS redirect rule [message #2643] Tue, 21 June 2011 10:17
naveedramzan  is currently offline naveedramzan
Messages: 1
Registered: June 2011
Location: Pakistan
i have few urls

www.example.com/css/site.css

www.example.com/js/site.js

www.example.com/activity.php

i want to write htaccess rule for above scenario.

I wrote :

RewriteRule (.*)/ $1.php

It works for php but not working for css/js.

Please help me out in this regard that if css or js or images then do not rewrite and if its www.example.com/activity/ then rewrite to www.example.com/activity.php

thanks
 Topic: this can be a great help
this can be a great help [message #2613] Fri, 17 June 2011 08:41
caicai  is currently offline caicai
Messages: 1
Registered: June 2011
There are desks which are aion gold intended for use with computers. They can include storage space cheap wow power leveling for a central computing unit, warcraft goldcord control devices and drawers which can buy wow power leveling store and allow access to keyboards. Look for computer desks which place components at ergonomic levels. This means placing the keyboard so that the wrists are in a neutral position and the monitor is at eye level. If you are doing a lot of work this can be a great help.


























ipad 2 folio cases ipad 2 silicone cases ipad 2 hard cases

[Updated on: Fri, 17 June 2011 08:41]

Pages (28): [ «    1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16    »]


Current Time: Thu May 17 07:47:57 CEST 2012

Powered by: FUDforum 3.0.0.
Copyright ©2001-2009 FUDforum Bulletin Board Software