Software :: Make A Url Redirect In The .htaccess?

Aug 4, 2010

I would like to make a url redirect in the .htaccess. I wonder where to find it and how to use it

View 1 Replies


ADVERTISEMENT

General :: .htaccess To Redirect All Requests To Another URL?

Apr 16, 2010

I would like to setup .htaccess to redirect every request to one website regardless of folder/filename combination to another URL.For example[URL]

View 1 Replies View Related

Server :: Apache Htaccess Redirect

Jul 23, 2009

I want to give a 404 error when the index.html file is requested, i already know how to do this in php, but i cant seem to locate any information about how to do it in htaccess. I thought about just redirecting index.html to a page that dose not exist, but i would like to do it correctly from the start.

View 2 Replies View Related

Server :: Setup A Apache Htaccess Redirect?

Jul 7, 2010

Stay I have a url to view files, e.g.

[URL]

How do I setup a apache htaccess redirect so I can use a static url like:

[URL]

View 3 Replies View Related

Ubuntu Servers :: .htaccess For Redirect After Site Move?

Aug 10, 2010

How can I redirect my URL after a site move.I have phpBB forum software installed on a 10.04 server, and I recently moved the forums from mysite.com/forums/ to mysite.com/.

So, a thread that looked like
mysite.com/forums/viewtopic=...
now looks like

[code]...

View 2 Replies View Related

Security :: Use .htaccess To Redirect Chinese Hacking Attempts?

Aug 9, 2010

My server (CentOS 5.4) is being bombarded 24x7 with IP addresses from China trying to exploit phpMyAdmin. For every one I block on the firewall, half a dozen come to the funeral! It's a pity these morons don't have something better to occupy their time. I'm getting page after page of this (see below) every day and it's been going on for weeks. I don't even have phpMyAdmin on the server. I don't use it and I deleted it.

I've read that you can use .htaccess and / or mod_rewrite to redirect / block them based on any query for phpMyAdmin (they try all letters in upper and lower case, leading to page after page). Unfortunately, I have no idea of how to do this. I already have an .htaccess file. Maybe someone can suggest what to add to stop these pests from wasting my bandwidth and suggest somewhere I could redirect them to to cause them maximum problems. I don't want to block the entire country, seems a bit like overkill, not all Chinese are morons. we aren't even in the USA, so why they are doing this is beyond me.

A TINY sample!
[Sun Aug 08 13:29:08 2010] [error] [client 61.191.41.53] File does not exist: /var/www/corp/phpMyAdmin-2.7.2

[code]...

View 6 Replies View Related

Server :: Apache - Redirect Through A .htaccess File In My Root Folder

Feb 2, 2011

I need to redirect through a .htaccess file in my root folder. The redirect needs to be done from http://www.department.univeristy.edu/reuir to a different server [url]. I am having trouble in determining the pattern that is required for it to take effect.

View 2 Replies View Related

Programming :: Apache Redirect - Core SEF URLs On - Using Htaccess.txt File That Came With Joomla

Apr 7, 2009

I have recently merged two Joomla 1.0 sites I ran into one. I imported the articles I wanted to keep to the new site, and I have the old site's domain pointing as an alias at the new site. The new site is www.theouthousers.com . The old site was www.bludblood.com .

I also have the core SEF URLs on, using the htaccess.txt file that came with Joomla.

I have one writer for the old site who linked to his articles in various places, so I am trying to set up redirects for him so that he doesn't have to change all of his links.

For instance, I need something like:

http://www.bludblood.com/joomla/inde...d=25&Itemid=51

To redirect to the equivalent location on the new site:

[url]

And I also need specific links like:

[url]

To redirect to their new counterparts:

[url]

Keeping in mind that www.bludblood.com is now an alias of www.theouthousers.com, is there any way to do this? I have been trying with rewrite rules and redirects, and cannot seem to achieve the desired effect.

Tried various versions of:

Code:
Redirect [url] [url]

With the http, without, as regexps, as 301s, as permanents, etc, and it just will not work. Also tried as RewriteRule.

View 2 Replies View Related

Red Hat :: Command To Add Into Htaccess To Make Certain Page Protected With Username And Password?

Jul 21, 2009

What command should i add into htaccess if i want to make a certain page protected with username and password?

View 1 Replies View Related

Ubuntu Servers :: Make It A .com - Redirect DNS To Server IP?

Oct 26, 2010

I'm hosting my own dedicated server with Ubuntu Server 10.10. I have it set up with a static local IP, and I've configured DynDNS to link up with my router and allow my server to go live to the internet. I have all the appropriate ports unlocked, with the exception of port 80. This port is blocked by my ISP (Charter) and I can't use it. Due to this, I configured my router to listen on port 81, and direct it to my server.

So, In order to view it, you need to go to the IP XXX.xxx.XXX.xxx:81 Today, I registered (www.online-self.com) in hopes of getting around my current mask (provided by DynDNS.com (omegame.selfip.com). So here is my dilemma, When I go to the host of my domain name , I want to redirect my DNS to my server IP.

I can't seem to do it though? They want a strict IP address, no port extensions. How do I get around this so that my domain name and IP address link up? I'm thinking I may be missing a step, or maybe I needed to register a domain name that simply redirects? I'm starting to get confused on what I should do next. Can I even do this?

View 6 Replies View Related

Ubuntu Networking :: Make 127.0.0.1:3306 Redirect To A Remote Mysql Server?

Mar 22, 2010

I'd love a hint or two on the following problem. I've set up iptables rules to forward all connections to port 3306 to a non-standard mysql port on a remote server. This works, except that I need to deal with the loopback interface in a special way and I'm stuck.

Code:
iptables -t nat -A PREROUTING -p tcp --dport 3306 -j DNAT --to 128.XXX.XXX.XXX:3197
iptables -A FORWARD -p tcp -d 128.XXX.XXX.XXX --dport 3197 -j ACCEPT
iptables -t nat -A POSTROUTING -j MASQUERADE
Since locally-generated packets will never hit the PREROUTING rule, you'll need to setup a near identical rule using OUTPUT to make it work. Here is what I've tried:

[Code]...

View 4 Replies View Related

Programming :: Bash - Automatically Build A Set Of Packages And Redirect Output Into Logs - Failed Make Should Return A Non-zero Value

Jun 27, 2011

I have a set of bash scripts that I'm running that automatically build a set of packages for me and redirect their output into logs. Basically, I have a bunch of lines that are something like this: ${CONFIGURE_DIR}/configure &> ${LOG_DIR}/log or cd ${CONFIGURE_DIR} && make &> ${LOG_DIR}/log, etc.

This is supposed to make the entire process silent. However, sometimes with some packages some output leaks to my console (either stdout or stderr). I'm thinking that maybe the configure scripts/make are executing commands within new shell instances that don't inherit my redirect, or something to that effect.

Another reason for thinking this is that in another part of my script I detect errors when running make by testing with "if [ $? -ne 0 ]", and if the redirect leaks to my console and also the leaked output indicates that the build failed ("make: Error" and so on), then my $? test fails (i.e., it thinks that $? == 0, whereas a failed make should return a non-zero value). It's as if my original script can't "see" the results from child commands executed from later scripts.

View 1 Replies View Related

Programming :: Bash Ambiguous Redirect - Redirect One Command Output Which Will Be Treat As A Content Of File For Another Command?

Mar 9, 2011

I am trying to grep multiple numbers from file, grep does have the -f option for that.

Code: grep -f <`seq 500 520` /etc/passwd I know this could be done with

Code: for i in `seq 500 520`; do grep "$i" /etc/passwd; done But my question is fare more behind this example. It is possible to redirect one command output which will be treat as a content of file for another command ?

View 2 Replies View Related

General :: .htaccess RewriteRule Map URL To Another

Apr 18, 2010

I've developed a web program and let say the main url is [URL]

I will be distributing different URLs for different customers and each customer will have their down database. Let say the URLs will be:

[URL]

because i be using single instance for my program, both this URLs will be pointing to the base code at http://domain.com. depending on whether is customer1 or customer2, the program configuration will extract from the respective database.

my question is, how do i use mod_rewrite to map the different urls to the main url with transparency. meaning, although each customer will see domain.com/customer1, this is actually pointing to the main base code at domain.com which has a config file to pick out the respective database.

I've managed to do it with alias in httpd.conf. e.g:

alias /user1 /var/www/html/myproject
alias /user2 /var/www/html/myproject

however, if i were to do this, i would have to restart apache every time i've got a new user. so i've decided to use .htaccess instead but realised that alias is not availble for it.

I've tried with rewriterule but with no success.

View 1 Replies View Related

Debian :: .htaccess And Wordpress Getting 404 Error

May 17, 2010

I run Debian 5.4 with ISP Manager as CP. I put a .htaccess in the root directory of my wordpress blog. The content of the .htaccess is:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f

[Code]....

But after I created a static page and change permalinks in wordpress with anything other than standard I get a browser 404 error (not 404 error with template).
Location of the blog content that is shown in CP: /var/www/sorin/data/sitename.ro Only the index of the blog is loading. What can I do? I have Debian up-to-date.

View 1 Replies View Related

OpenSUSE :: Enable .htaccess In A Folder?

Aug 5, 2009

in /srv/www/htdocs/tale i have a .htaccess how to enable it? i don't changed anything in

Code:
/etc/apache2/httpd.conf
/etc/apache2/default-server.conf

View 9 Replies View Related

Ubuntu :: .htaccess Disappear After Unzipping?

Jun 30, 2010

I downlload a zip file which has a .htaccess file.

When I unzip it, the .htaccess disappears.

How can I prevent this happens?

View 3 Replies View Related

Ubuntu Servers :: New Domain Same Box Htaccess?

Sep 1, 2011

I am changing domain name for web, web is staying on same IP / ServerI want www.OLD.com to redirect (change address name in browser) to at the moment both point to same IP..am not sure why but this .htaccess is not working.

Code:
#Options +FollowSymLinks
RewriteEngine on

[code]....

View 1 Replies View Related

Server :: .htaccess And .htpasswd Not Working?

Feb 27, 2011

I have created a sub directory on my box on a website for my company. It is a page that has links to my tools I want to use when I do service calls. Links that connect to my servers webmin etc. Of course I don't want them found by webcrawling bots. I have created a .htpasswd file using htpasswd -c /location/to/file/.htpasswd.

This file is located outside the web. Just under the public_html folder. Then I went to the sub directory I want to protect and added a text file named .htaccess. It contains:

/home/sites/www.domain.net/tech/
AuthType Basic
AuthName "Some long name"
AuthUserFile /home/sites/www.domain.net/.htpasswd
Require valid-user
ErrorDocument errornumber /home/sites/errorpages/403.html

I also opened the httpd.conf and changed AllowedOverride to All

The error document doesn't work either.

I then restarted the httpd service. I try to access the site and it lets me right in without asking for a password. It is apache 2xxx on Centos 4.5. Webmin under Apache confifirms all this.

View 12 Replies View Related

Server :: Mod_rewrite Htaccess Not Working?

Nov 25, 2010

I want to use rewite module to change my site url from site/index.php to site/cat/ for example I have created .htaccess file in the directory where the file is and add to it:

Code:

RewriteEngine on
Rwerite ^cat$ /site/index.php

Here site is not my site, it just in example. I have rewrite.load in the loading list of modules and I can see it loads in phpinfo(). AllowOverride is set to All for the current site, but no redirect is made on site/cat

View 2 Replies View Related

Server :: Securing Wordpress With Htaccess ?

May 16, 2011

I have a blog on my site and am using htaccess rewrite rules to block all those nasty scripts from trying to execute various things mostly relating to phpmyadmin and wordpress. This has reduced my httpd error logs to less than half from before.

Am trying to come up with a rule to rewrite all calls to certain files if they are not originating from my domain, here is how it looks right now but it's not working as I can see scripts trying to hit "wp-comments-post.php" getting a 500 Internal Server Error.

View 2 Replies View Related

CentOS 5 Server :: Htaccess Be Used Under SSL Mode?

Dec 4, 2010

I create and edit .htaccess file under /var/www/html/ directory, everything goes well as expected.
The corresponding snippet of /etc/httpd/conf/httpd.conf:

AccessFileName .htaccess
<VirtualHost *:80>
DocumentRoot /var/www/html/
ServerName www.abc.com
<Directory /var/www/html/>
AllowOverride AuthConfig

[Code]...

View 5 Replies View Related

CentOS 5 Server :: Htaccess Not Working In 5.5

Feb 22, 2011

I have searched high and low both on this website and the big G and nothing.I have a VPS with fresh CentOS 5.5 install and can't seem to get the server to act on the htaccess file.

View 1 Replies View Related

Debian :: Enabling HTAccess In Apache2 For Lenny

Aug 25, 2011

My distro is Lenny. I am struggling with trying to enable .htaccess files. I followed a ubuntu tutorial that did not work at all. How do I enable .htaccess files in all apache2 directories for Debian 5.0 Lenny?

View 1 Replies View Related

Fedora Servers :: Usage Of The .htaccess File?

Dec 16, 2010

Is anyone here fluent with the usage of the .htaccess file? Is it the way to go to deter search bots or is there a better method? Never mind. I already have a thread about .htaccess here.

View 1 Replies View Related

Ubuntu Servers :: Apache2 - HTAccess Will Not Work

Feb 9, 2010

I'm a newb when it comes to linux operating systems so I'm attempting to get better through experience. I work for a web development company and we use Ubuntu for our operating systems (the programmers at least). Anyways, I'm trying to install LAMP services and get them working. I have all L.A.M.P. services installed... but Apache2 is giving me a problem. I have an .htaccess file installed in a directory under my document root. But Apache2 is not interpreting it. I have AllowOverride All on but I can't figure it out. I did make a bogus .htaccess file attempting to make apache give me a error, nothing.

View 2 Replies View Related

Ubuntu Servers :: Htaccess Won't Secure A Directory

Nov 22, 2010

I installed AWSTATS on my LAMP 10.04 LTS and followed several tutorials URL...) but I can't secure the folder, either by an alias or by .htaccess. I tried both methods manually and by using Webmin.If you go to the URL www.mywebsite/awstats/awstats.pl it shows up, which is good, but this is the default installation site and anyone who knows awstats could possibly see my stats. The conf folder is /etc/awstats/, and I did an alias for that, then .htacess, but neither worked. With the .htaccess, I would get a password promt but the full stats page was visible behind the password promt, and if you clicked "Cancel" about 20 times or so the promt would go away and the full stats page would be visible.

The actual file that powers awstats is in /usr/share/lib/cgi-bin/awstats.pl, and I also tried an Alias and .htaccess seperately and neither worked.I restarted apache2 after each change and I've searched several forums, but I still can't figure this out.

View 2 Replies View Related

Ubuntu Servers :: .htaccess File Keep Getting Deleted?

Jan 27, 2011

I am running into a very strange problem where my my .htaccess file keep getting deleted.Attempted scenarios ftp upload file.txt rename to .htaccess ftp upload .htaccess ssh - wget url/.htaccess ssh - wget url/htaccess.txt, rename to .htaccess

[Code]...

View 7 Replies View Related

Ubuntu Security :: Htaccess Doesn't Seem To Work?

Jan 30, 2011

I can't seem to get htaccess to work.I've created a .htpasswd file like so:

Code:
htpasswd -c -m .htpasswd user
Then it prompts me for a password for that user. I put the password file one dir above my

[code]....

View 6 Replies View Related

Ubuntu :: .htaccess Ip Restriction Doesn't Work On EC2?

Jul 7, 2011

I just launched an instance on EC2, and everything seems work except the IP restriction by .htaccess. My .htaccess is only:

Order deny,allow
Deny from all
Allow from 88.246.163.6

And it doesn't restrict access.. What am i missing?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved