How To Use .htaccess To Remove Subdirectory...

Apr 7, 2007

Is it possible to use .htaccss to remove the subdirectory from a url? The reason I ask it that the script I want to use requires members to be in a /users/ directory, and I would like to remove that part of the url. For instance...

can I use .htaccess to change www.thewebsite.com/users/username

to www.thewebsite.com/username

I have absolutely no need to access the /users/ directory without the username, it's just that all accounts are created in that directory.

Is it possible?

View 1 Replies


ADVERTISEMENT

Apache :: HTAccess - Remove Same Word From End Of URL?

Mar 18, 2013

I've modified my old website, and now need to remove the phrase "cheap-products"

Some example url's

randomdomain.com/product-1000-cheap-products/
randomdomain.com/product-1001-cheap-products/
randomdomain.com/product-1002-cheap-products/

How do I make it so it will forward (seo wise) to the following

randomdomain.com/product-1000/
randomdomain.com/product-1001/
randomdomain.com/product-1002/

View 4 Replies View Related

Redirecting Forum From Subdomain To Subdirectory

Apr 25, 2009

We are wanting to move our forum from a subdomain where it lies currently to a subdirectory of the main site.

I know that this could be done via htacess, but I am wanting to make sure that we don.t lose any of the backlinks that we have coming in, or any page rankings that we have accumulated.

I have a htaccess rule, but I guess I need to know if

a) it is Correct

b) where to put it

Now please bear with me as I cant post urls, so this bit is quite difficult to get out... I have replaced the link elements with CAPPS, such as www becomes 3WS

Options +FollowSymLinks -Indexes
RewriteEngine on
RewriteCond %{HTTP_HOST}!^3WS. [NC]
RewriteCond %{HTTP_HOST} ^(.*).DOMAINHERE.TLD [NC]
RewriteRule (.*) HTTPCOLONSLASHSLASHDOMAINGOESHEREWITHTLD/%1/$1 [R=301,L]

Do i still need to point the subdomain at a folder with just this in, and then have a separate folder where the actual forum goes....

or do I put this in the htaccess, then also point at the directory to be the location for the /forum/

View 1 Replies View Related

Mod_rewrite Move System To Subdirectory

Jul 16, 2008

I'm currently trying to set up a an old Project Management System we developed in house to be able to be run from a subdirectory (currently it is designed to run from the DocumentRoot). I figured I would be able to just throw together some mod_rewrite rules to be able to rewrite all requests to the subdirectory, but still haven't had any luck.

I'm pretty good with regular expressions, just not alot of experience with mod_rewrite.

Here's the idea I'm going for

Code:
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/sub
RewriteRule (.*) /sub/$1

The PMS is littered with header redirects and stuff, so it'd be nice to be able to do it all from an .htaccess file or httpd.conf (if necassary).

View 5 Replies View Related

How To Hide A Subdirectory Pointing To A Subdomain

Apr 25, 2007

On most servers using a vhost you can make a subdomain point to a subdirectory.

so www.host.com/stuff would be stuff.host.com

That works fine for me. I now want to avoid people being to access the www.host.com/stuff and always have to go via the subdomain.

If I create a rewrite rule I'll get an infinite loop as the subdomain and subdirectory will keep on going to each other.

What is the proper way of disabling access via the subdirectory?

View 1 Replies View Related

How To Change Php Files Permissions In Directory And Subdirectory At Once

Nov 9, 2007

How to Change php files permissions in directory and subdirectory at once ?

I want to change the permissions of php permissions to be 644 in /home/user/public_html/forum and all forum subdirectory using SSH.

View 2 Replies View Related

Remove Empty Folders And Remove From A Db

Jul 22, 2009

ive got a site which auto creates subdomains and installs a script automaticly and inserts details into a mysql db. i have had some issues recent so have loads (talking 100s) of folders that are empty which i need to remove, and to remove the details of said folder from db also. any ideas how i can do this, using plesk control panel so removing the subdomain via plesk cli may be the best way in that respect but the db is external to plesk so that would not be edited

View 0 Replies View Related

Remove Lfd

May 21, 2009

I just need to CSF on my server, i dont need to lfd and i need to remove lfd from my server.

View 9 Replies View Related

Remove Xen Xps

May 20, 2009

I have setup a xen VPS some time back. I need to remove it permanently. I have used the commands virsh destroy <domainID> as well as xm destroy <domainID>. However they only performs a shutdown. I can restore it back!

I want to remove / wipe it permanently and memory consumed is given up then and reflected in the core server.

View 2 Replies View Related

Remove APF

May 30, 2008

How can remove apf firewall?

I need to remove and install apf again. Because its damaged now

View 7 Replies View Related

How To Remove BFD And APF

Oct 14, 2007

some body installed it for me and I do not know how to remove, how to uninstall BFD and APF

View 3 Replies View Related

How To Remove Csf Firewall

Sep 12, 2006

i want to remove csf firewall. Its creating alot of issues. So any guide how can i remove csf and ldf ... ?

View 2 Replies View Related

Is It Safe To Remove All Of /tmp

Jul 6, 2009

My /tmp on my cPanel hosting server is nearly full, and I was wondering if it is safe to remove all the contents in /tmp, if not, what can I delete to clear up the space?

View 6 Replies View Related

How To Remove Suphp

Mar 23, 2009

i have many problem from this

i want to remove it

i had recompiled apache without it but it still working

View 2 Replies View Related

Remove Locus7shell

May 5, 2008

I am using Cpanel version 11 with FreeBsd.
Some body has installed locus7shell on one of my website
using Joomla.

How can i removed it.Has any one faced this thing.

View 1 Replies View Related

Yum Remove Command

Jul 29, 2008

I had some issues with PHP compilation seems to be issue with zlib. So I decided to remove it. What happened then is something like nightmare...

The command yum remove zlib removed zlib + all dependencies without asking me what to remove. So it removed majority of packages including yum itself.

How can I force yum to not remove dependencies when I uninstall some package?

View 5 Replies View Related

How To Remove Roundcube

Apr 21, 2008

I installed Roundcube on my cPanel server but it isn't working for me and I want to uninstall it and maybe try again.

How do I uninstall it, I can't find any information anywhere?

View 9 Replies View Related

How To Remove EAccelerator

Dec 8, 2007

How to remove eAccelerator, I updated my apache and there I got the option to install it ,and I installed it

View 7 Replies View Related

Can Not Remove Second Drive

Sep 4, 2007

My server has 2 drives,one is backup drive. The backup drive seem to be failing so i decide to remove it. However when i remove it,the system can not boot. ANyone got this issue?

View 14 Replies View Related

Can I Remove This Folder

Jun 10, 2007

When I installed PHP 5.2.1 the howto said to put it in /home/cpphpbuild/ then un-tar it which I did and I am left with a folder called php-5.2.1

Can I delete this folder without breaking PHP 5?

View 5 Replies View Related

RewriteRule: Remove Www From All Url

Apr 19, 2007

on my server I'm trying to remove 'www' from all subdomain urls.

For example:
[url]-> should be -> [url]
[url]-> [url]...

what rewrite rules to use?

I suppose I've to put this rule in httpd.conf and apply it at Server level.

I'm using this

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.([^.]+).example.com
RewriteRule (.*) [url]

where %1 is one subdomain.
The problem is I want this to work on ALL Subdomains.

What rewrite rule should I use?

View 8 Replies View Related

How To Completely Remove HyperVM

Jun 10, 2009

As per the title, what steps are needed to remove HyperVM altogether from the server leaving just the OpenVZ or Xen kernels?

View 6 Replies View Related

How To Remove Virus/Trojan

Dec 7, 2008

how can I remove a Virus/Trojan from my website?

View 6 Replies View Related

How Do I Remove My ISP IP From Email And Only Use My Server IP

Jul 6, 2009

The way Exim is setup on Cpanel/Centos is that it adds the origination IP and server IP address that the email is relayed through.

Because many RBL's flag Verizon and Comcast ISP IP's as spam sources; it causes my email relayed through my server to be rejected. Note: My server IP is not on any RBL for spam or abuse.

Is there a way to edit Exim to only use the server IP adddress that I relay through?

View 8 Replies View Related

Remove Ip From Linux Server

Apr 14, 2009

How can remove eth0:12 (for ever) from ssh server?

View 3 Replies View Related

Can I Remove/disable Named?

Jul 8, 2009

can i remove/disable named on the main server if i run dedicated dns servers?

View 3 Replies View Related

How To Remove Pre Website Loading Ads

Sep 13, 2008

I have this site gameplanet,pri,ee and it has this built-in annoying ad that always

shows up if you're viewing the website for the first time.

Is there a way to remove or disable it or do anything about it.

View 2 Replies View Related

How Do I Remove Suhosin-0.9.24 Extension

Dec 11, 2008

got suhosin-0.9.24 extension on my centos 5.2 server, the patch has NOT been applied.
how do i remove/uninstall suhosin-0.9.24?

View 3 Replies View Related

Remove History Command

Nov 25, 2008

Is there any way so that i can remove a specific command from history.

628 ll
629 cat bash.sh
630 man mail
631 exit
632 history

You see my history command displays output as this. I need to remove the 630 th command.
Is this possible ?

I can use history -r but, it will remove all the commands executed in the session.

I need a command to remove a specific thing from history.

View 10 Replies View Related

Remove Banned IP Addresses

May 19, 2008

How can make a cronjob for remove banned ip with CSF every 15min?

View 4 Replies View Related







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