Redirect site.com/filename.jpg to site.com/uploads/filename.jpg with .htaccess
Well the title sums it up. Thanks in advance ...
Well the title sums it up. Thanks in advance ...
Hi I have the following in a .htaccess file redirect 301 /page.php http://domain.com/page Which works fine and as expected. I want to be able to redirect the following http://domain2.com/page.php to http://domain2.com/page or http://domain3.com/page.php to http://domain3.com/page or http://domain4.com/page.php to http://domain4....
I moved my cakephp site from a subdomain over to a different domain. I handled the permanent redirect in my htaccess file but in the redirect i am losing my neat/clean url handling. old site iphone.gameachievements.org new site gameachievements.org example of current redirect iphone.gameachievements.org/games/jungle-swing -> gameac...
Almost in any project I work on, some issues with .htaccess occur. I usually just find the easiest solution and leave it because I don't have any knowledge or understanding for Apache, servers etc. But this time I thought I would ask you guys. This is the files and folders in my (simplified) setup: /modrewrite-test .htaccess /c...
Hi, I have following rewrite rules for a website: RewriteEngine On # Stop reading config files RewriteCond %{REQUEST_FILENAME} .*/web.config$ [NC,OR] RewriteCond %{REQUEST_FILENAME} .*/\.htaccess$ [NC] RewriteRule ^(.+)$ - [F] # Rewrite to url RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUE...
I'm trying to password protect a directory on a server that's running IIS. I've put the following in the .htaccess file in that directory - AuthName "Restricted Area" AuthType Basic AuthUserFile /path/.htpasswd AuthGroupFile /dev/null require valid-user I've tried a whole bunch of different paths and although it's asking for a user...
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:...
I am looking to create a 301 redirect based purely on a query string see b OLD URL: olddomain.com/?pc=/product/9999 New URL: newurl.php?var=yup My normal way of doing this would be redirect 301 pc=/product/9999 newurl.php?var=yup But this time I am trying to match a URL that that only contains the domain and a query string... Wha...
I started working on a project in the mid. We are using Zend Framework, PHP, MySql, Ajax, jQuery and jSon on Ubuntu. It was working on ubuntu. Now I switched to Windows. I installed Wamp, Eclipse and create a host(test.dev) on windows for my project. But when start the project by test.dev. it give me the following error on browser windo...
OK, I'm new to this, so pardon if the question is already a FAQ. Searching multiple places still leaves me dumbfounded. I have a Web site generated with iWeb09/Mac hosting on an ISP. To secure certain pages, I am trying to set up .htaccess + .htpasswd files. The basic directory structure is ... Main ... index.html ... Images.html .....
So I have moved a website and am trying to 301 redirect everything, which I do quite often so this is a weird problem but probably something stupid I'm not seeing. ALL of my redirects are working fine, except any redirect that the first string starts with "/Dining" or "/dining" are failing. For example, this redirect works fine- Redir...
Hi there just wondering; How do I deny direct access to files in a specific folder. I have an upload script that uploads to /uploadedFiles and currently I just have an index.php which redirects the user to the login page. However, how do I stop users from accessing a file directly such as: /uploadedFiles/thisFile.jpeg Thanks in advan...
Hey guys! I'm having trouble figuring out how to exclude /public/bin from this rewrite rule RewriteCond %{REQUEST_URI} !firerift.php RewriteRule ^(.*)$ firerift.php/$1 [L,QSA,NC] Any help would be appreciated. ...
Say I have a subdomain xxx.yyy.com running Apache. The files are stored in /home/someone/public_html/xxx. What I want to do is redirect all requests to a domain name zzz.com which is using the same location for its files. (In other words, xxx.yyy.com and zzz.com are aliases for each other) I just want people accessing zzz.com, so if so...
Hi, I'm looking to set-up a vBulletin install next to a CakePHP install. I was planning on just popping the the vB folder into webroot, but when accessing the folder in my browser, it loses the short URL (i.e. it goes from .com/community to .com/app/webroot/community) Because of this I wanted to put the vB folder into the root of the di...
Hello, I'm hoping that this will be a simple question that someone can answer. I'm looking to build a CodeIgniter application that I can build pretty easily in regular PHP. Example: I would like to go to http://locahost/gregavola and have rewritten using htaccess file to profile.php?user=gregavola. How can I do this in CodeIgniter? U...
All of the expires headers articles I've looked at give more or less the following solution: ExpiresByType image/gif A2592000 ExpiresByType image/png A2592000 ExpiresByType image/jpg A2592000 ExpiresByType image/jpeg A2592000 But it doesn't make sense to me because I know which of my images are going to change and which aren't, so I w...
Given urls like this: mysite.com/index.php mysite.com/page/member/lobby.php mysite.com/page/videos/video1.php How can I rewrite the urls with .htaccess to hide the /page/ folder when it's present? So the end result is: mysite.com/index.php mysite.com/member/lobby.php mysite.com/videos/video1.php ...
i don't know much about IIS, except it's a web server (just like apache) and mostly run for ASP. How we set library like moD_rewrtie and .htaccess in this kind of server? ...
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 p...