.htaccess

How do I assign file extensions a particular parser using htaccess?

Suppose I wanted to have all files named ".myexcellentpage" to be parsed with PHP, or with Perl, or as HTML, or what have you. What do I have to do in htaccess to achieve this? ...

Redirecting a /?p=xxx wordpress URL

I need to redirect a single Wordpress URL that is formatted like this: www.bluewidgets.com/?p=123 to a clean URL on another domain. How can I do this via .htaccess? All of the tutorials I've seen say that I need to specify another part of the url, like index.php, before the query string, but my URL doesn't have one - it's just the domain...

How to temporarily move a django site into a subdirectory (for testing) ?

I am in the process of deploying a new Django site to replace a current Wordpress blog. As I get it setup, I want to test everything in the domain's subdirectory before I switch things to the root and "go live". For example: http://example.com/django/ Editing my .htaccess file allows me to redirect things without a hitch (I can see th...

.htaccess passing domain name

I am trying to Rewrite path in .htaccess =-=-=-=-=-EDIT=-=-= Hi I may not have expressed my problem clearly. So here's a live example of my problem. "http://fames.in/site/bollywoodhungama.com" - works fine "http://fames.in/site/bollywoodhungama.com/2" - error The format of the url is: http://fames.in/site/(site name)/(page number...

Mod-Rewrite for large sites...how much is too much?

I have a huge site with lots of different functionality...and I really want to have beautiful url's throughout. The problem is that my Mod-Rewrite has become a monster of its own...most of the sections have different URL needs, directory depths, etc. How many rules are too much? and what is normal? Is it better to simply mod-rewrite th...

How to prevent access of admin pages by knowing the admin page url?

If someone knows my url of the admin page such as www.example.com/admin.php, then they will easily access the page by directly accesing that url. How to restrict this. Please help ...

Server error, why this error message appears when i use .htaccess

when I use .htaccess file inside a folder named admin with the following code AuthName "Alertme" AuthType Basic AuthUserFile /mobs/.htpasswd require valid-user and .htpasswd file with following code rajasekar:66Acdia7gE1to While accessing the file inside folder, it gives server error, The server encountered an internal error and wa...

HTTP authentication using htaccess/htpasswd ...dialogue box comes up twice...

I have a site that has the main path under password protection. I also have a subfolder that have a separate (htaccess/htpasswd) password protection. For some reason, when I access the subfolder, I'm asked to put in my id/password twice. All of the files that are referenced are under the subfolder. What should I be doing to troublesh...

Mod Rewrite with Joomla

Basically I have a joomla instance with an article that uses URL rewriting. http://example.com/kids-and-family/185-summer-camp.html goes to the corresponding article when typed into the url. I now want this URL to be accessed by using http://example.com/camp This seems to be the bulk of the .htaccess file: ########## Begin - Joomla!...

htaccess redirect problem

I have the following redirects in my htaccess file Redirect 301 /communityed/index.htm http://www.domain.com/community_education Redirect 301 /communityed http://www.domain.com/community_education Redirect 301 /communityed/visit/index.htm http://www.domain.com/directions/ Red...

301 Htaccess Redirect Rule

Need help with an 301 htaccess redirect rule doing the following for all the files in these paths: www.name.com/wordA/wordB/* to www.name.com/new_word/wordA/wordB/* we are basically adding "new_word" to the new url string. ...

how i had to specify .htpasswd file path in .htaccess relative or absolute.

I created a password protected folder using .htpasswd. In .htacces how should i specify this .htpasswd file. like this AuthUserFile http://alertalert.freetzi.com/admin/.htpasswd or like this AuthUserFile /admin/.htpasswd or any other method. Plz help ...

username and password not accpeted when using .htaccess and .htpasswd?

I used .htaccess and .htpasswd to restrict the admin folder which is located at root/admin for that i used the following .htaccess file AuthName "Alertalert" AuthType Basic AuthUserFile http://alertalert.freetzi.com/admin/.htpasswd require valid-user .htpasswd file rajasekar:$apr1$0yd92n1r$McIxIiQXPRF1u3gRBNRNc1 the .htaccess an...

mod_rewrite not working consistently

I've got a rewriting scheme going on that was working fine. Basically, anything in the url is passed as a querystring to index.php, so /dave/bob is rewritten to /index.php?page=dave/bob. I deal with the parsing of this in index.php. Here's my .htaccess: RewriteEngine on RewriteRule ^([^\.]+)?$ index.php?page=$1 [L] The problem I'm hav...

CodeIgniter configuration with mod_rewrite, xampp and windows.

I'm a noob to CodeIgniter and am trying to figure out the configuration for an app I'm building. Something is wrong with my setup. I'm running XAMPP on Windows and am using an alias directory to point to the applications directory. In other words: "http://localhost/app_name/ " points to the root directory of the application. It all s...

Can I remove leading zeros in a url in django ?

Am redirecting urls from a legacy site, which gets me to a url like this: http://example.com/blog/01/detail I would like to automatically remove the leading zeros from these urls (seems it doesn't matter how many zeros are in there 001 0001 000001 work) so that the page redirects to: http://example.com/blog/1/detail Is there a simple...

301 Redirect Rule

Need help with an 301 htaccess redirect rule doing the following: www.name.com/wordA/wordB/* to www.name.com/WordNEW/wordA/wordB/* we are basically adding "WordNew". I have three wordA and five wordB for a total of 15 path variations. ...

exclude files from rewrite rule in .htaccess

I'm modifying an existing website that uses a fairly complex .htaccess file to implement a custom MVC type framework so all urls are redirected to index.php?[some parameters] or a 404 page. I'd like to add ajax support to a limited area of the site using XAJAX, and to implement that I need to place two files in the root which are ignore...

mod rewrite everything but one request_uri

Hey all, I'm running a project site that has a zend framework in one folder, and a Project Pier (sort of Basecamp) install in a completely different folder (because it was installed way earlier, initially running from another domain). The domain I registered for this project redirects to the zend/public/ directory with the following ru...

Mod_rewrite Question

I have an HTML file I want rewritten as a subfolder on the server. http://www.example.com/kids-and-family/185-summer-camp.html to be shortened to: http://www.example.com/camp Is there an rewrite condition where I can make this happen in .htaccess? Can I say if (/camp) then display /kids-and-family/185-summer-camp.html? I have been ...