Tagged Questions
5
votes
3answers
9k 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 ...
4
votes
1answer
287 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:
...
2
votes
2answers
69 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
...
2
votes
2answers
634 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 ...
2
votes
1answer
114 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$ ...
2
votes
1answer
276 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
1answer
27 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
...
1
vote
1answer
397 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 ...
1
vote
1answer
304 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, ...
1
vote
1answer
113 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 ...
1
vote
1answer
43 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
3k 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 ...
1
vote
2answers
593 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 ...
0
votes
1answer
75 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 ...
0
votes
1answer
191 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?