Directory-level configuration file found mostly on Apache web servers
2
votes
1answer
103 views
RewriteRule for URL Subdirectory Root
Have not found this in my searches on SE.
I need this scenario to work:
• User visits someurl.com/news/folder or someurl.com/news/somefolder/, they get redirected to someurl.com/somefolder.
• If ...
1
vote
1answer
591 views
Google Chrome audit: resources are explicitly non-cacheable?
If I run a Google Chrome audit on a site, it lists all CSS, PNG, JPG, JS files and even the main domain (i.e. www.example.com) under the heading:
Leverage browser caching
The following resources ...
2
votes
3answers
182 views
How to remove /index.html
How to make redirect /index.html -> / in Apache?
Redirect /index.html http://domain-name.com/
Is causeing infinite loop when opening home page.
1
vote
1answer
1k views
Enable 'mod_rewrite' Using .htaccess File On cPanel Shared Hosting Server
I'm using cPanel to host my website. I need to enable 'mod_rewrite' on this Shared Hosting cPanel account to run my script. I've tried to Google the solutions high and low but did not find any luck ...
3
votes
3answers
352 views
using .htaccess to redirect .asp to .php?
Ahoy all! I've been racking my brain with this one.
I basically just converted all of my pages from ASP code to PHP code. Kept the same filenames.
So, here is the htaccess code I have so far, but ...
3
votes
1answer
71 views
301 redirect for a page with a space in it
I have some pages from a client's old template-based site which have spaces in them. For example, one of the pages looks like this:
example.com/page.php?domain_name=example.com&viewpage=Gallery ...
1
vote
3answers
308 views
.htaccess 301 redirect with regex?
How to do this with regular expression?
Old -> New
http://www.example.com/1.html -> http://www.example.com/dir/1.html
http://www.example.com/2.html -> http://www.example.com/dir/2.html
...
1
vote
1answer
134 views
Removing 301 redirect from site root
I'm having a look at a friends website (a fairly old PHP based one) which they've been advised needs re-structuring. The key points being:
URLs should be lower case and more "friendly".
The root ...
2
votes
1answer
67 views
Rewrite catalog/index.php to www.domain.co.uk
We have an online shop with a welcome page. Our SEO company has asked us to get rid of the welcome page with a rewrite. I am struggling to get this to work. Can you help please?
I want to rewrite ...
0
votes
0answers
53 views
htaccess correct, Apache logs still showing the evil visitors with 200 code [closed]
I hope someone can help me. Please take a look at the following snippet of Apache logs:
95-169-172-157.evilvisitor.com - - [12/Nov/2012:09:46:02 -0500] "GET /the-page-I-dont-want-to-deliver.html ...
0
votes
0answers
263 views
blocking bad bots with robots.txt in 2012 [closed]
does it still work good? I have this:
# Generated using http://solidshellsecurity.com services
# Begin block Bad-Robots from robots.txt
User-agent: asterias
Disallow:/
User-agent: BackDoorBot/1.0
...
3
votes
2answers
177 views
How do sites avoid SEO issues and legalities with subdomain unique ids?
I was looking through a few websites recently and noticed a trend I'm not sure I understand. Sites are creating unique referral URLs for customers in the form of: http://customname.site.com
(If ...
1
vote
1answer
55 views
How can I rewrite a subdomain to go to a specific file in a specific folder?
I've done searching for my answer and have tested a few solutions, but nothing has worked so far.
I'm trying to get a URL like this http://baseball.sports.com to rewrite to ...
0
votes
1answer
77 views
How to ensure apache2 reads htaccess for custom expiry?
I have a site with Apache 2.2.22 . I have enabled the mod-expires and mod-headers modules seemingly correctly:
$ apachectl -t -D DUMP_MODULES
…
expires_module (shared)
headers_module (shared)
…
...
0
votes
1answer
110 views
how can i redirect from specific url to another url? [closed]
My website users have a profiles. I want other users to access their profiles by specific url like:
www.mysite.com/username
Users can also access a specific parts in the user profile like that
...
1
vote
1answer
188 views
google chrome : http authentication issue on iframe
I have an HTML file with 2 links both links are in an iframe to load the contents inside the iframe. I have two protected directories one on the same server and other on another server. If you click ...
2
votes
2answers
151 views
Send 404 Status Code on www.domain.com
Does anyone know if it's at all possible (preferably with htaccess), to send a 404 error code and page when visiting http://www.domain.com but have http://domain.com working just fine?
I want to 404 ...
2
votes
1answer
222 views
Remove multiple trailing slashes in a single 301 in .htaccess?
There is a similar question here, but the solution does not work in Apache for our site.
I'm trying to remove multiple trailing slashes from URLs on our site. I found some .htaccess code that seems ...
0
votes
1answer
227 views
Rewrite in Mediawiki, remove index.php, htaccess
I've just installed Mediawiki on Apache and I want the url should be
localhost/Main_Page/
localhost/Special:Recent_Changes
...
instead of
localhost/index.php/Main_Page/
...
1
vote
1answer
118 views
Google Indexing Issue after htaccess changes
I have a site called www.FuneralCoverFinder.co.za. I have about 30 pages on the site and usually have 29 indexed. (Excluding 15 blog posts) They are new.
I recently upgraded my entire site and made ...
2
votes
0answers
207 views
Seeking htaccess help: Converting multiple subdomains (both http and https) to www.domain.com using .htaccess
I've been trying to get an answer to this question on other forums (the folks at SuperUser thought this was the place I needed to post) and via my connections, but I haven't gotten very far. Hopefully ...
1
vote
1answer
130 views
How to redirect requests to another folder using htaccess
How to redirect requests to another folder using htaccess?
I have my root directory and my website looks into that directory. I want it to look in the /subdirectory/ instead. I can't modify the ...
0
votes
0answers
193 views
URL-rewriting on Plesk using ISAPI_rewrite3 Lite
I am using Plesk Windows based web server with Windows 2008 server OS with IIS-6 for my e-commerce website.
I want to rewrite URLs for all dynamic pages, So I installed ISAPI_Rewrite 3 Lite on my web ...
3
votes
1answer
162 views
How can I redirect all files in a directory that doesn't conform to a certain filename structure?
I have a website where a previous developer had updated several webpages. The issue is that the developer had made each new webpage with new filenames, and deleted the old filenames. I've worked with ...
3
votes
1answer
127 views
Subdomain In Addon Domain Is Not Working
I added a new addon domain to my cPanel hosting. With the new added addon domain, I try to make some subdomain of it. But, the subdomain is not working like subfolder does.
This is my situation:
...
2
votes
1answer
88 views
Stop Apache serving filetypes
Preferably using .htaccess files, though .conf files are an option, is there any way to stop Apache serving certain filetypes?
For example, .db shouldn't be served for obvious reason (privacy and ...
4
votes
1answer
334 views
How can redirect pages from old core PHP site to new Joomla site?
We have our old site into core PHP and we have developed it again into Joomla 1.5 last year (because of some limitations we have to build it into 1.5). Now the problem is the URL of sites changed as ...
1
vote
3answers
2k views
How do I do URL re-writes on Plesk?
I am very new to URL re-writing and I am using Plesk which is window-based web server, hence I can't use Apache's mod_Rewrite. Can anyone tell me what is the proper procedure for this?
1
vote
2answers
98 views
How do I redirect www and non but not IP
I am trying to redirect www.domain.com or domain.com to www.domain.com/temp.html
I am using the following code:
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^/?$ ...
5
votes
1answer
442 views
URL masking with .htaccess
I need a hardcore programmer to help me with URL masking.
So this is my situation.
My website www.michaelfotograf.dk/blog/ is the main site that needs to be configured.
I have another ...
2
votes
1answer
131 views
How to hide download file from bots? [duplicate]
Possible Duplicate:
How to restrict the download of all files in a folder?
I want to make a private file available for download but not use username/password protection. I want to put the ...
1
vote
1answer
84 views
Is it possible to use two different ErrorDocuments for different paths of a website?
I currently run PmWiki at mydomain.com/pmwiki. I have a 404 page and .htaccess set up in my site's document root for 404 pages regarding anything that doesn't have to do with my wiki. By default, ...
0
votes
0answers
106 views
SIMPLEST way to set up password protection for a static site, with basic admin UI?
I have a static site.
I would like the simplest approach to password protecting a directory, with a basic admin UI for adding/removing users. I will have so few users that I don't care about ...
7
votes
3answers
226 views
How to re-direct Wordpress posts with 301
All my WordPress post URLs generate sub directories with duplicate content and I do not know what regular expression to use to consistently 301 redirect domain.com/category/post/random-number/ to ...
7
votes
1answer
232 views
home page of my site is not appear in google search, when I type site:example.com
I am totally confused, when I place site:example.com in google I see every page of my website in serp(search engine result page) except the home page. I don’t know why it’s happening but I check ...
2
votes
1answer
93 views
How to track a cronjob running on my site?
I have an old Joomla 1.5 site hosted on a shared Bluehost server.
Recently my .htaccess files are being rewritten every 10 minutes, and the site has been black listed.
It looks like some php cronjob.
...
2
votes
1answer
300 views
Need a generic way to create SEO friendly URL
I have searched a lot and implemented many many Regular Expression in my .htaccess file but can not succeed. How do I find a generic way that make my URL SEO friendly?
Currently this is in my ...
5
votes
2answers
430 views
.htaccess two different rules but only one per time
I'm rather new to the whole .htaccess thing and I'm using the following right now to use 'pretty url's':
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
...
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 ...
3
votes
1answer
82 views
URL hex characters in .htaccess
There is an old page with a space in the filename, and this is no longer found on the website. So I need to redirect this page to another page using a 301 redirect in .htaccess.
If I place the ...
3
votes
1answer
374 views
Wild card redirect in htaccess giving error this webpage has a redirect loop
In my website I changed the directory name "vehicles-cars" to "vehicles-cars-for-sale". When I tried to redirect using a wild card redirect from my old directory name to new directory name in my web ...
3
votes
0answers
360 views
Password protect an alias virtual directory
I have a main domain being hosted through CPanel. I also have a sub-domain that I would like to appear as a path under the main domain instead of as a sub-domain. So I have:
http://example.com/ ...
2
votes
1answer
422 views
.htaccess 301 Redirect for wildcard subdomains
I run WordPress in Network mode, which means I can have multiple websites running off one installation of WordPress. Each website runs as a subdomain. WordPress handles this using .htaccess, and a ...
3
votes
1answer
328 views
Disallow all user agents except one using .htaccess?
I've been struggling to get this .htaccess working. The aim is to disallow all user agents besides my app. The app sends a GET request with a user agent of lets say 'AcmeUpdater'.
Whenever I try to ...
1
vote
1answer
235 views
RedirectMatch in .htaccess not working
I am using Transposh plugin to make my site 'bilingual'. Unfortunately, despite having English as the default language and therefore available at carolineelisa.com/xxx, Google is indexing ...
0
votes
1answer
1k views
.htaccess non-www to www rule seems to work but the URL isn't changing in the address bar
On a joomla site, apache, shared hosting, I'm using next .htaccess rule:
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
The problem is that the browser's ...
1
vote
1answer
187 views
Limited 301 Redirect performance in .htaccess?
I'm in a situation and haven't been able to find a proper solution after much research. I'm working with a client who just built a new website with a different URL structure. After the website was ...
2
votes
1answer
422 views
Help with 301 redirect from subdomain to root domain
I need to forward existing subdomain links to the root domain as the subdomain no longer exists. I have tried so many different lines of code in my .htaccess file and can not get the redirect to work.
...
0
votes
0answers
64 views
Configuring PHP Scripts To Accept any User and Group Permissions [closed]
A client I'm doing some PHP work for has a virtual private server set up to host his website. The server admin has made every folder starting from root be non-group-writable and owned by ...
1
vote
0answers
213 views
404 error on a file/directory that exists?
We are using the vBulletin system.
I have set it up so that it redirects 404 error's to a php page, so it follows the theme of the forum.
However, if I go to a directory that exists (the admin ...

