Search Results

Search found 2190 results on 88 pages for 'htaccess'.

Page 15/88 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • How can I view the all inherited url-resolution rules affecting a given directory?

    - by john.designop.us
    I work on two sites hosted on the same server, using the same CMS configurations and identical .htaccess files in their respective document roots. One site is letting me use the CMS's clean-url mode, and the other isn't. Site #2 functions fine in ?=messy-url mode, but when I turn clean urls on in the admin panel, and request a rewritten URL, I get a 404 error served before the CMS sees the request. I've contacted the server administrator, but he isn't inclined to provide support and the site owners are beholden to this hosting provider. I have shell access to the Linux-based server, and I can verify that mod_php and mod_rewrite are active, but I don't know what more I can do to troubleshoot this issue. Is there any way to identify directives upstream that may be differentiating the way http requests are handled by the two sites? Thanks!

    Read the article

  • CNAME Record in .htaccess file: correct format?

    - by Josh
    In my .htaccess file, I have set up several A records in the following structure: RewriteCond %{HTTP_HOST} ^domain.com$ [OR] RewriteCond %{HTTP_HOST} ^www.domain.com$ RewriteRule ^substring\/substring\/etc?$ "http\:\/\/domain\.com\/newsubstring\/etc\/" [R=301,L] Is is possible to easily set up a CNAME record in the same fashion and put it in my .htaccess file? Unfortunately, my dumb DNS (namecheap) doesn't let me change CNAME records because my site actually has hosting and isn't just a parked domain. (I actually just want to set up a CNAME for www, since at the moment www.domain.com doesn't work for me, and only domain.com -- I'm going to point the former to the latter.)

    Read the article

  • How to tell .htaccess to ignore a subdirectory (or, how to run WordPress and ExpressionEngine simult

    - by Mike Crittenden
    I have an ExpressionEngine site at http://example.com and a WordPress blog at http://example.com/blog ...the problem is, any WP pages that don't map directly to an index.php end up being handled by ExpressionEngine, which results in a 404. For example, http://example.com/blog and http://example.com/blog/wp-admin both work fine as they both directly use an index.php in those folders, but http://example.com/blog/category/tag/something gets handled by ExpressionEngine. So how can I modify the ExpressionEngine .htaccess file to tell it to ignore anything in the /blog directory? Here's what's currently in the ExpressionEngine .htaccess file: Options +FollowSymLinks RewriteEngine On ##### Remove index.php ###################################### RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php/$1 [L] ##### Add WWW ############################################### RewriteCond %{HTTP_HOST} ^getregionalcash.com [NC] RewriteRule ^(.*)$ http://www.getregionalcash.com/$1 [R=301,NC] ##### Increase File Limit Size ############################## #set max upload file size php_value upload_max_filesize 20M #set max post size php_value post_max_size 20M #set max time script can take php_value max_execution_time 6000000 #set max time for input to be recieved php_value max_input_time 6000000 #increase php memory limit php_value memory_limit 64M Any ideas?

    Read the article

  • Using .htaccess to server files from Amazon S3 CloudFront

    - by Adrian A.
    My ideal setup would be to take a current clients site, upload a .htaccess with a regex inside, that would match the URI, and if it finds a certain file extension, it would use the same path, but with an altered domain. ie. Normal path: http://www.domain.com/something/images/someimage.jpeg http://www.domain.com/assets/js/jquery.js .htaccess translated would turn the above into: http://mycdn.other.com/something/images/someimage.jpeg http://mycdn.other.com/assets/js/jquery.js I googled this for hours in a row, no luck. Again, this is for actually making use of Amazon's CloudFront. S3 is already mounted to the website for backups and storing files using s3fs, but this doesn't solve the issue since it's using S3 directly, not using the CloudFront.

    Read the article

  • Kohana3: Different .htaccess rewritebase and kohana base_url for dev and production environment

    - by Svish
    In my bootstrap.php I have the following: if($_SERVER['SERVER_NAME'] == 'localhost') Kohana::$environment = 'development'; else Kohana::$environment = 'production'; ... switch(Kohana::$environment) { case 'development': $settings = array('base_url' => '/kohana/', 'index_file' => FALSE); break; default: $settings = array('base_url' => '/', 'index_file' => FALSE); break; } In .htaccesshave this: # Installation directory RewriteBase /kohana/ This means that if I just upload my kohana application, it will break because the RewriteBase in the .htaccess file will be wrong. Is there a way I can have a conditional in the .htaccess file similar to the one I have in the bootstrap so that it will use the correct RewriteBase?

    Read the article

  • .htaccess Subfolder Redirect

    - by John K
    Hey Guys & Gals, I recently moved my WordPress website to a subfolder. I want to add a redirect in the .htaccess file so that the links to images I've uploaded originally to ~/wp-content/uploads/ will pass to ~/blog/wp-content/uploads. The .htaccess file must remain in the root folder for WordPress to read it properly. This is what I tried Redirect /wp-content/uploads/ /blog/wp-content/uploads That worked great, except I host other domains on this account, and all of the other domain's upload folders were being redirected in a similar manner. Is there a way to restrict this redirect to just one domain? So that example.com/wp-content/uploads redirects to example.com/blog/wp-content/uploads, but another.com/wp-content/uploads does not? Thanks everyone!

    Read the article

  • htaccess rule redirect non www to www - litespeed server

    - by webdev28
    I have a question about using htaccess in my litespeed server. I tried to redirect http://domain.com to http://www.domain.com using this rule: Options +FollowSymLinks RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{HTTP_HOST} ^domain\.com$ [NC] RewriteRule .* http://www.domain.com/ [L,R=301] When I check http://domain.com using Xenu, the result is as follow: http://domain.com/ 200 ok text/html 301 Moved Permanently http://domain.com/%s 200 ok text/html 301 Moved Permanently http://www.litespeedtech.com/ 200 ok text/html LiteSpeed Web Server http://www.domain.com/ 200 ok text/html redir I wonder whether I had incorrect htaccess rule or this is because of bug in litespeed? I have searched anywhere for hours...Thanks

    Read the article

  • joomla .htaccess file rewrite rule explanation required

    - by Vivek Chandraprakash
    Hi, I'm trying to understand the following lines in joomla's .htaccess file. Can someone explain this please #RewriteCond %{REQUEST_FILENAME} !-f #RewriteCond %{REQUEST_FILENAME} !-d #RewriteCond %{REQUEST_URI} !^/index.php #RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC] #RewriteRule (.*) index.php #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] I want to do some custom redirects for example if a url is like this example.com/subdirectory1 i want to redirect to some article. tried adding this line in the .htaccess file RewriteRule ^somepath index.php?option=com_content&view=article&id=1&Itemid=12 but for some reason the article shows the title even though it's not supposed to show. when i access using the long url string the title doesn't appear if i rewrite it appears. Please help. -Vivek

    Read the article

  • .htaccess add hidden php get variable for language selection

    - by Eric Di Bari
    I have a multiple language website, and I use a php get variable to set the cookie for the language setting. I have multiple subfolders (http://www.site.com/es and http://www.site.com/de) that each have a respective .htaccess file. When accessing these folders, the .htaccess file does this to "silently" redirect the user and add the appropriate php variable: ------- Options +FollowSymlinks RewriteEngine on RewriteOptions MaxRedirects=10 rewriterule ^http://www.site.com/es/$ http://www.site.com/?l=es [P,R=301] rewriterule ^(.*)$ http://www.site.com/$1?l=es [P,R=301] ------- When someone accesses the root directory: http://www.site.com, I want to add a ?l=en suffix "silently" to the url. How do I do that? Thanks.

    Read the article

  • Exclude a URL from rewrite in .htaccess with "last" flag

    - by songdogtech
    WordPress has been installed as a blog into osCommerce. I'm trying to get the WordPress RSS feed to work. All WP core files exist, but I get all kinds of errors accessing the feed at mydomain.com/wordpress/feed/, like 404s, "the feed can't be updated because the source file is no longer available," or even raw php code in the browser from the osCommerce feed file. I think the problem is the rewrite rules for osCommerce, and I'm thinking if I can exclude the WP feed URL from rewrite, it will fix the feed or help find the real issue. Looking around SO, I found a solution to use the "last" flag on a URL to prevent it from being rewritten. Problem is, the existing .htaccess already has a rule with a "last" flag on it: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ http://www.mydomain.com/index.php?cPath=$1 [L] Is there a way to not rewrite the WP feed URL? Can another "last" rule be added? I'd like to have some definite things to try before messing with .htaccess to avoid disrupting the site.

    Read the article

  • htaccess rewrite issue while testing on localhost

    - by James Doc
    I'm running OSX (10.6) with Apache with .htaccess enabled. In the htaccess file I have the code: Options +FollowSymlinks RewriteEngine on RewriteRule ^page/([A-Z0-9._%+-]+) index.php?page=$1 [NC] This runs perfectly on my external server and redirects nicely to index.php?page=whatever However when testing locally from localhost/~james/In%20Progress/Vila%20Maninga/page/whatever I get redirected to localhost/~james/Users/James/Sites/In%20Progress/Vila%20Maninga/index.php?page=whatever. For some reason 'Users/James/Sites/' is being added. Does anyone why this is happening and how to prevent it? Many thanks, James

    Read the article

  • .htaccess more than one command

    - by Stefan
    Hey I have an .htaccess file with the following code: <Files ~ "item|profile|category|search"> ForceType application/x-httpd-php </Files> What I want is to add a re-write rule as well which changes any body who navigates tot he site ot use http://www.domain.com sintead of http://domain.com I have the code stored somewhere else for it however I can't seem to just place in the file as it corrupts? Or just doesn't work... I wish I knew more about .htaccess files How can I add this in? Thanks, Stefan

    Read the article

  • allowing index access only with .htaccess

    - by YsoL8
    Hello I have this in my .htaccess file, in the site root: Options -Indexes <directory ../.*> Deny from all </directory> <Files .htaccess> order allow,deny deny from all </Files> <Files index.php> Order allow,deny allow from all </Files> What I'm trying to achieve is to block folder and file access to anything that isn't called index.php, regardless of which directory is accessed. I have the folder part working perfectly and the deny from all rule is working as well - but my attempt to allow access to index.php is failing. Basically could someone tell me how to get it working?

    Read the article

  • php cgi htaccess

    - by msaif
    i try to execute cgi but failed. i include following lines in .htaccess AddHandler cgi-script .cgi Options +ExecCGI abc.com/ is equivalent to the /home directory abc.com/compare is equivalent to the /home/compare directory abc.com/compare/contact is equivalent to the /home/compare/contact directory .htaccess file located in contact directory but server returns the following message. Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.More information about this error may be available in the server error log. what is the problem one more thing is can i see phpinfo() that cgi is enable or not??

    Read the article

  • Using .htaccess to replace backslash in URL with forward-slash

    - by DamienL
    I realise that a backslash should never appear in a URL in a form other than a URL escape code, however in this case the URL's are being generated by a .NET application for generating flashbooks. I have contacted the developer of this application with a bug report. In the interim i would like to use .htaccess to rewrite the offending backslashes. This is how the URLs appear in fiddler debugging proxy. www.example.com/folder/folder/thumbs%5C1.jpg I am using Firefox and it looks as though Firefox is translating them into the URL encoded equivalent ( \ == %5C1 ). Interestingly IE translates the backslash into a forward-slash automatically (not adhering to standards but convenient in this case). Is there a way to use .htaccess to rewrite all \ to /?

    Read the article

  • .htaccess redirect with other settings

    - by Zack
    I am using CakePHP framework, it redirect everything to the app folder using .htaccess, and then I set up a WordPress blog in /news/ folder outside of CakePHP, so I don't want everything in /news/ to be redirect, so I modify the .htaccess, and here is the final version: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^/news/(.*)$ RewriteRule ^.*$ - [L] </IfModule> <IfModule mod_rewrite.c> RewriteEngine on RewriteBase / RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L] </IfModule> And here is the question: I want to redirect mydomain/super to mydomain/news/super, how to do this without infecting other settings?

    Read the article

  • URL Rewrite in htaccess problem

    - by davykiash
    Am rather new to this world of htaccess redirects.Am trying to force all redirects in my Zend MVC to my https but I get a requested URL not found error on requests that dont go though the index controller Example https://www.example.com/auth/register gives a requested URL /auth/register not found error. However if I remove the https redirect rule it works fine over http. If I adjust the URL to https://www.example.com/index.php/auth/register it works fine. The URL https://www.example.com/index/faq works just fine since it goes through the index controller. My .htaccess file looks like this RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L] RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] <ifModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* </ifModule> What do I need to adjust to get the URL https://www.example.com/auth/register working?

    Read the article

  • Drupal htaccess redirect - all files in directory to new directory

    - by hfidgen
    Hiya, I've moved a site to Drupal, but am now getting a lot of 404 errors due to the search engines taking their time to update the indexes. The 404 paths all look similar to this: recipedata/ccp1300006/633_L.jpg recipedata/ccp1500005/risotto.jpg recipedata/ccp1500006/haddock.jpg So I'd like to do some htaccess redirection with mod_rewrite to take care of this lot. All the images DO exist - the path has just changed to /sites/default/files/images/ I've edited a lot of redirects into my htaccess already, but because the ccpXXXXXX directory changes I can't quite figure out the regex. This was my last attempt, but yeah - doesn't work :) Can anyone give me some pointers? RewriteRule ^recipedata/(ccp+)/(.+)$ http://domain.co.uk/sites/default/files/images/$2 [R=301,L] This has to be in the context of the Drupal mod_rewrite rules which already exist <IfModule mod_rewrite.c> RewriteEngine on # Rewrite URLs of the form 'x' to the form 'index.php?q=x'. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] </IfModule> Thanks!

    Read the article

  • htaccess - Redirects with more than 1 slash not working

    - by barfoon
    Hey everyone, Just moved to shared hosting on GoDaddy and Im trying to get my .htaccess rules working. Heres what I have: ErrorDocument 404 /error.php Options FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.mydomain\.org$ RewriteRule ^(.*)$ http://mydomain.org/$1 [R=301,L] RewriteRule ^view/(\w+)$ viewitem.php?itemid=$1 [R=301,L] RewriteRule ^category/(\w+)$ viewcategory.php?tag=$1 [R=301,L] RewriteRule ^faq$ faq.php RewriteRule ^about$ about.php RewriteRule ^contact$ contact.php RewriteRule ^submit$ submit.php RewriteRule ^contactmsg$ handler-contact.php All the pages @ the root of the domain seem to be working i.e mydomain.org/faq, mydomain.org/about are working. But whenever I try mydomain.org/category/somecategory, I get a 404. How can I fix my .htaccess to obey these rules that are more than 1 level deep? Thanks,

    Read the article

  • Htaccess... first force www than ask for login

    - by FinalFrag
    I have an .htaccess file that mainly does 2 things. Force www on the domain and ask for login credentials (with .htpasswd). If I now visit domain.com it will ask for a username and password. When I fill them in I get redirected to www.domain.com and then it asks me to log in again. Is there any way to get the www redirection done before the login? I already tried putting the force www code on the top of the .htaccess file.

    Read the article

  • htaccess for swf file

    - by Charles Wayne
    Does htaccess works with swf file that accepts variables? I have this swf url... http://subdom.domain.tld/subfolder/live.swf?stream=rtmp://stream.domain.com/application&provider=rtmp&file=streamname&autostart=true I want it to be rewrite as http://subdom.domain.tld/subfolder/assignedname/ So far this is what I written on .htaccess file RewriteEngine On RewriteRule ^kwt/?$ live.swf?stream=rtmp://stream.domain.com/application&provider=rtmp&file=streamname&autostart=true [NC,L] It does seem to rewrite to the swf file because the swf is showing but for some reason the variable is not recognized. It does not auto play even the auto play variable is set to true in the RewriteRule. Is there something wrong with my code or it can't be done in swf file?

    Read the article

  • .htaccess redirect domain alias / parked domain

    - by Calua
    Hi... I have a .htaccess related question. For example, if I have two domain, a.com and b.com. All referring to one host (b.com is domain alias of a.com). I want visitor that visit a.com will be referred to url with www (http://www.a.com). As for the visitor of http://b.com will be referred to the www url (http://www.b.com). How can I do this with .htaccess?? Thanks, any help will be much appreciated :)

    Read the article

  • non www .htaccess redirect - ignore other subdomains.

    - by qxxx
    Hi, I have a .htaccess redirect for "non www" like this: RewriteEngine on RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] it is working. But, i have also some subdomains other than www. If I call for example http://shop.example.com it redirects me to: http://www.shop.example.com I dont want to write the subdomains into the .htaccess file, it should work automatically, just ignore anything else than www and '' like this: if subdomain =='' -> redirect to www.HTTP_HOST.... elseif subdomain !='' && subdomain !='www' -> do nothing. thanks!

    Read the article

  • using .htaccess to redirect from friendly url to actual file

    - by Kohalza
    I have the following RewriteRule in my .htaccess to redirect from a friendly url to my main application file: RewriteRule ^\/(.*).html$ home/www/page.php?p=$1 [L] This should send any url that points to a html page to page.php with the url as a parameter that will be parsed by the app. This works for urls that look like http://www.example.com/hello.html The problem is that I get a 404 error when the url contains a directory path, for example: http://www.example.com/category/hello.html The error reads: "File does not exist: /home/www/category" Seems it is first looking for the 'category' path instead of processing the .htaccess Any ideas how to solve this?

    Read the article

  • .htaccess more than one command in the file

    - by Stefan
    Hey I have an .htaccess file with the following code: <Files ~ "item|profile|category|search"> ForceType application/x-httpd-php </Files> What I want is to add a re-write rule as well which changes any body who navigates to the site to use http://www.domain.com sintead of http://domain.com I have the code: RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ http://www.DOMAIN.com/$1 [R,L] however I can't seem to just place in the file as it corrupts? Or just doesn't work... I wish I knew more about .htaccess files How can I add this in? Thanks, Stefan

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >