0
votes
1answer
177 views

htaccess redirect pages that don't exist

I have a website that has a little over 100 members. Each member gets a replicated website, and by default the software we use sets up their replicated website at a url like: domain.com/?username ...
2
votes
1answer
47 views

Force url to use www [duplicate]

I'm confused about how to force my url to use www in the address. I have a .htaccess code like this: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f ...
0
votes
1answer
107 views

Spiders crawling broken links

Tl:Dr Unknown bot crawling the same broken (HTTP 400) URL over and over again. Different User Agent and different country of origin. The Problem It seems at least once a week we're getting a big ...
2
votes
1answer
384 views

How do I use htaccess to make a short URL to a MediaWiki page?

I'd like to rewrite /liam to /index.php/Liam_Edwards-Playne. I've currently written this below in the appropriate .htaccess file but it is still returning a 404: RewriteEngine On RewriteRule ^/liam$ ...
1
vote
1answer
135 views

Apache URL Rewrite

I'm trying and failing to get a URL rewrite working, firstly I'm doing it in the vhost declaration, is that right? What I'm trying to do is take any URL which has; view.php?id=[a 1 or multidigit ...
2
votes
1answer
595 views

Avoid the login popup when using http-auth

I have an Apache. Under the DOCUMENTROOT is a folder with an .htpasswd file for http-auth. If I open the browser and request the content in the folder I get an Popup to login. Is there a way to avoid ...
2
votes
2answers
914 views

apache rewriting url doesn't work(using godaddy hosting)

I'm using a framework to create my website(codeigniter) by default the urls are like this:mysite.com/index.php?/etc/etc/etc. And I'm trying to remove the index.php?, I tried to remove it by doing ...
0
votes
1answer
227 views

htaccess - “detect” url and redirect

Idea is: if URL = "http:/localhost/site/" else if URL = "http:/localhost/site" redirect to "http:/localhost/site/index.html" Can this be done with .htaccess / Apache mod_rewrite and how?
5
votes
3answers
16k views

How to remove trailing slashes from URL with .htaccess?

The situation Across the entire domain, we'd like the URLs to hide file extensions and remove trailing slashes, independent of the domain name itself (as in, works on any domain). Sample of our ...
2
votes
2answers
214 views

Can you rewrite the root?

Not sure how to word this one but will explain most I can. I am trying to make the following happen. Re-write this http://domain.name To this http://domain.name/home/ Is it possible ? update ...
1
vote
1answer
532 views

Can Apache “Correct” URL Case?

Let's say I keep every word of file names capitalized. For example, Home.php or MultipleWordTitle.html. Is there any way for Apache to redirect requests for incorrectly-cased URLs to the capitalized ...
2
votes
1answer
929 views

http://www.example.com/http://www.example.com/ in Apache log?

I run a website, let's say www.example.com. On it I have a path and file, say www.example.com/path/file.html. The Apache log lists GET requests like: GET /path/file.html HTTP/1.1 Which is correct, ...
5
votes
1answer
354 views

How should incorrectly encoded URLs be handled?

Just recently noticed that some sites link with the URL incorrectly percent-encoded, to which my server (LAMP) responds with a 404 Not Found. For example, for a URL of mine like this: ...
1
vote
1answer
44 views

Tricky mod_rewrite challenge

I list about 9,000 records on my little site. At the moment I'm showing them with a dynamic page, like http://domain.com/records.php?id=019031 But I'd like to start using meaningful URLs like this ...
1
vote
1answer
5k views

How to setup mod_rewrite/htaccess to do url masking and forwarding to a subdirectory?

Its been about three years since I've played with apache and php(I've been using thin and nignx ;). So I've forgotten how to setup a mod_rewrite directive to forward all http requests from root to the ...
0
votes
1answer
258 views

How to block access to a sub-site with mod_rewrite?

Let's say I have the sites siteA.com and siteB.com. They are hosted such that siteB.com actually points to siteA.com/siteB. How can I block someone from visiting siteA.com/siteB using mod_rewrite? ...
2
votes
2answers
810 views

Need some help on tomcat URL mod_rewrite or mod_jk

I am trying to remove the context name from the URL of my server. Current URL - http://www.domainname.com/MyApp/ What I need to make is to make it available at - www.domainname.com/ So it is only ...