Tagged Questions
2
votes
1answer
26 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
0answers
33 views
URL rewrite with mod_rewrite
I have rewrite rule in parent directory which rewrites URL:
From example.com/index.php?id=test&cat=category
To example.com/index?test&cat=category
Here is my .htaccess file:
Options ...
0
votes
1answer
74 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
110 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
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 ...
2
votes
1answer
275 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
632 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
190 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
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 ...
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
...
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 ...
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:
...
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 ...
0
votes
1answer
217 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?
...
1
vote
2answers
591 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 ...