I'm hosting several domains on one account, and I currently have a RewriteRule set to redirect the root url (www.root.com) to a subdirectory (/public_html/root/).
However, I have few directories in the root (/public_html/xyz/) that I would like to access from the root url (www.root.com/xyz). Is this possible to write a redirect for this...
Using php I authenticate a user, then behind the scenes,they are then again authenticated a second time with a single .htaccess username & password. This would be the same for all users, but I would not want them to have to enter a username and password again and they would now be allowed to enter the password protected directory. I pref...
I have set up a few rules based on other questions but now my css breaks
I did have the URL /
/eshop/cart.php?products_id=bla
and everything work fine. but now with my mod rewrite url-
/product/product-title/
It loose the base directory. Is there an option to fix this? So i dont have to go back with the full url in all the img ...
I want to give different expiry headers to different images on my site. they are contained in different folders right now, what I want to do is give then different expires headers with one main .htaccess file. I know this can be done with multiple .htaccess files in those folders but I dont want it to be implemented that way, It will cle...
I have a very long a unfriendly URL an I'm looking to make SEO better for the site:
http://www.site.com/sub-site/index.php?page=nameofpage&locale=en_EN
I would like to have this instead:
http://
www.site.com/sub-site/en/nameofpage
all the URLS are hard coded in the links in the form of:
<a href="index.php?page=nameofpage&locale=e...
Hello everyone,
I'm about to start building a subscription based website that will function much like 37signals offerings in terms of users paying a monthly fee to use the site.
But in my case I would like for them to be able to use their own hosted domain names and have them point to my server.
Is this possible? How do i link up the...
I'm using a PHP framework which redirect all URL to the index.php file using the following rule:
RewriteRule ^(.*)$ /index.php/$1 [L]
However, I want to be able to use index.html IF ANY ONLY IF users hit the home page. For instance, if users hit http:// website.com it will render the index.html file. Any other URL will use index.php. C...
Is it possible using PHP (I was thinking may the phpinfo file or a php.ini file) or an .htaccess file to set a doctype for an entire subdirectory?
Basically, in a nutshell, I'm using a software that uses XSL templates to output data to a set of HTML files. Modifying the xsl:output tag to include the doctype breaks the template and ther...
Hi,
I have seen a few answers to this on SOF but most of these are concerned with the use of subdomains, of which none have worked for me. The common one being that the use of session.cookie_domain, which from my understanding will only work with subdomains.
I am interested in a solution that deals with deals with entirely different d...
Default syntax for Header set Expires is
Header set Expires "Wed, 21 May 2010 20:00:00 GMT"
and default syntax for ExpiresDefault is
ExpiresDefault A2592000
OR
ExpiresByType image/gif A60
I want to use such a syntax for Header set Expires, that is I want to pass an expires time in seconds after access. how can i do this ?
...
i need to much the sentense, if it doesn't contain some words
i wrote it like this
^([^news|home|rules|contacts|month_films|archive|ratings])$
but it doesn't work.
could you tell me why? thanks
...
I want to allow hotlinking only from a list of referrers (paying customers, probably a few hundred).
I am on Apache 1.3 and I do not have access to the configuration (only .htaccess).
What is the fastest way to implement this?
My thoughts so far:
PHP with database and readfile()
(SSI with) Perl and database
the list implemented as s...
I have the following Apache directives to process every *.xml file on the web server:
AddHandler ae_xslt .xml
Action ae_xslt test.php
DirectoryIndex index.xml index.php index.html
The problem is that I get an internal server error (500).
When I look in the Apache error logs I get the following error:
Htaccess: Action takes ...
I want to run an instance of wordpress within my rails app. I currently have wordpress files housed in public/wordpress, but I need to configure my .htaccess file to allow both types of requests. How do I do that? currently, .htaccess is:
General Apache options
AddHandler fcgid-script .fcgi
RewriteEngine On
RewriteRule ^$ index.html [QS...
Hi, I'm creating a website. I have this code in the .htaccess file:
RewriteEngine On
RewriteRule ^/([-a-zA-Z0-9_]+)/$ /redirect.php?id=$1
But when I go to, for example /ASEi it says 404 Not Found. What's the problem?
...
Hi all,
I've got an e-shop on a virtual server that's been used as a subdirectory for the last few years, but now I'm finally giving the VS it's own domain name. What I really need is visitors to the old URL to be transparently (and 301) redirected to the new URL with everything after /eshop/ maintained and apended to the new host.
I.e...
I am trying to redirect all requests to domain.com/drupal to domain.com, including all sub directories in /drupal.
I have seen several answers telling me how to accomplish the opposite of this with .htaccess, but nothing to go this way. I have tried the following line in .htaccess-
RewriteRule /drupal/* ^/(.*)
as well as several var...
Hi,
my custom 404.php page is located in /includes/404.php.
My current .htaccess file does the following redirect:
ErrorDocument 404 http://imgpls.localhost/includes/404.php
So the url looks like: mysite.com/includes/404.php .
Basically I need a double redirect: 1) 404 eror page to mysite.com/404.php (so the url looks nice) 2) mys...
I am running a site xyz.org in Drupal. Now I want to install some other modules such as PHPBB forum and Coppermine gallery. When I install these, and try to access the link xyz.org/gallery, it gives me drupal "Page not found" error. What settings I need to change in order to let drupal know that /gallery is not a drupal node?
...
We are currently using a template-based website and are hoping to move to a site with static urls. Our domain will stay the same. I understand that using 301 redirects in a .htaccess file is the preferred method -- and the one that has the highest chance of preserving our google rankings.
I am still new at all this and am having a ha...