On my site, I've got Wordpress in www.mydomain.co.uk, I've got a search engine on find.mydomain.co.uk, and I've got subusers on a wildcard with a script in a subdirectory to work out what to serve, based on the subdomain.
In cpanel, I have, for the subdomain redirect:
*.mydomain.co.uk /mydomain
find.mydomain.co.uk /mydomain/find
in...
Hi,
As part of one our system's we enable a user in the backoffice to add a block of 301 redirects should they need to. This is just a textarea which then populates a specific area of a .htaccess file. As much as this may seem insecure it has only previously used internally by people who know what they are doing but for various reasons ...
Is it possible to achieve this? For example I will have "website.com/index.php?skin=name" can I password protect only this url? (with no php changing only htaccess)
P.S. "website.com/index.php" or "website.com/index.php?skin=other_name" should not be restricted..
Thanks!
...
Hello. I am developing a pretty large website for a client, and its about 90% complete. It is currently hosted on a subdomain like so:
now: v2.websitehere.com
when complete: www.websitehere.com
My problem is that SO much of this site is linked to the temporary subdomain. The newsletter service, multiple google apis, etc. I als...
Hi all
I want to set a subdomain for all site users, like www.companyname.mydomain.com
I would like to use htaccess for this.
when somebody requests www.companyname.mydomain.com it should redirect to
myfile.php?name=companyname
How can I achieve this using an htaccess file ?
Thanks for the consideration.
...
I ran tests on my website using Google's PageSpeed and it recommends that I "Leverage browser caching" and provided the following resource:
http://code.google.com/speed/page-speed/docs/caching.html#LeverageBrowserCaching
This resource never explains how to actually change the expiration date of my http headers. Do I do this through ....
I have an .htaccess file that is not working properly. And it used to.
Here is the file:
RewriteEngine On
# Category
#Edit
RewriteRule ^edit/([^/]+)/?$ /edit_solutions/index.php?category=$1 [L]
RewriteRule ^edit/?$ /edit_solutions/choose.php [L]
#Report
RewriteRule ^reports/([^/]+)/?$ /report/report.php?project=$1 [L]
RewriteRule ^...
I recently moved my blog from
http://blog.mydomain.com
to
http://mydomain.com
My problem now is that I have sites linking to the old addresses.
What can I put in my .htaccess file to make, for instance,
http://blog.mydomain.com/my-post-title-here
go to
http://mydomain.com/my-post-title-here
Thanks in advance!
...
I have URLs that are generated as http://www.domainname.com/about?layout=item
I would like to find out how to remove the ?layout=item and also ?layout=category
Any help would be much appreciated
...
Hello , guys
I need some help on mod rewrite 301 , to redirect my old website address to the new address ,
here is my scenario
ive www.domain1.com/page1/
want to be redirect to domain2.com/page1/
ive to replace all request goes to domain1 with domain2 and keep the page after .com
so watever was after .com should be the same just rep...
I have a website, I want to set up a folder within that sit called second_site and I want to get a new domain and point it to my website, then with .htaccess check which domain it is, if the main domain keep it the same, if the new domain make second_site the site-root.
Is this possible?
...
I'm using Drupal 6. Typically, when the user requests a URL for which Drupal has no response, it uses index.php as the error document. However, I'd like to suspend this behavior for a specific URL. How can I do this?
RewriteCond %{REQUEST_FILENAME} !=fail
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
...
Hi, thanks for looking.
I know you can't redirect anchor URLs to another page, but is it possible to redirect a URL to only a single anchor?
So
http://www.example.com/video/{title}
always gets sent to
http://www.example.com/video.php?title={title}#player
The only thing that changes is the title, anchor is always the same... I ne...
I currently have this rule where I want the page to just render my static content.
RewriteRule ^videos\/coverage\/view\/236159\-([0-9a-zA-Z-]+) http: //website.com/static/236159.html [NC]
However, this doesn't work. It works with a L tag but then the URL is different:
RewriteRule ^videos\/coverage\/view\/236159\-([0-9a-zA-Z-]+) http...
Is there any way to make /name.html and /name/ work interoperably in the event of a 404 error?
For example, if the following fails:
http://domain.com/name.html
Then it would attempt:
http://domain.com/name/
And only go to a 404 page if that directory didn't exist? The reverse would be interesting too, going from dir to .html, and then...
Ok, so I really don't know much about mod_rewrite and I'm looking over the apache docs and still not figuring this out.
Here is my htaccess (which is mostly just copy & pasted from a site I found):
.htaccess in base dir:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule (.*) public...
hi all,
I need ur help for given subject.
I am playing with htaccess rules first time in life.
here is the scene -
i want to redirect the urls -
http://www.abc.com/var1
http://www.abc.com/var2
to follwing urls -
http://www.abc.com/index.php?u=var1
http://www.abc.com/index.php?u=var2
In this case the values var1 & var2 can...
Hi to all,
i am trying to use friendly url for my categories.
Example Database
cat_id | parent_id | name | url
1 0 cat1 cat1
2 1 cat2 cat2
My approach to do is to pass the parameter cat with url value for example show.php?cat=cat1
and in .htacce...
What .htaccess rewriterule should i use to detect known bots, for example the big ones:
altavista, google, bing, yahoo
I know i can check for their ips, or hosts, but is there a better way?
...
I am developing a website using PHP and Apache.
I wanna turn my URLs from
www.example.com/book.php?book=title
into something like this, if it is possible of course:
www.example.com/book/title
Notice that the title of the books are unique and cannot be repeated.
I`ve read about this, but none of the posts were clear enough for a beg...