Search Results

Search found 436 results on 18 pages for 'subfolder'.

Page 1/18 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Url rewrite subfolder to root and forbid accessing subfolder

    - by Alessandro Pezzato
    I have drupal installed in a subfolder drupal, but I want to access pages as it is in root folder: http://www.example.com instead of http://www.example.com/drupal I'm able to have this working, but it's also working with url containing subfolder, so I have http://www.example.com and a clone site in http://www.example.com/drupal What is the rule to forbid access to subfolder? I want all url starting with http://www.example.com/drupal being forbidden. This is .htaccess in / directory: Options -Indexes Options +FollowSymLinks <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^ http://%1%{REQUEST_URI} [L,R=301] RewriteRule ^(.*+)$ drupal/$1 [L,QSA] </IfModule> And this is drupal .htaccess in /drupal/ directory: Options -Indexes Options +FollowSymLinks ErrorDocument 404 index.php DirectoryIndex index.php index.html index.htm # Override PHP settings that cannot be changed at runtime. See # sites/default/default.settings.php and drupal_initialize_variables() in # includes/bootstrap.inc for settings that can be changed at runtime. # PHP 5, Apache 1 and 2. <IfModule mod_php5.c> php_flag magic_quotes_gpc off php_flag magic_quotes_sybase off php_flag register_globals off php_flag session.auto_start off php_value mbstring.http_input pass php_value mbstring.http_output pass php_flag mbstring.encoding_translation off </IfModule> # Requires mod_expires to be enabled. <IfModule mod_expires.c> # Enable expirations. ExpiresActive On # Cache all files for 2 weeks after access (A). ExpiresDefault A1209600 <FilesMatch \.php$> # Do not allow PHP scripts to be cached unless they explicitly send cache # headers themselves. Otherwise all scripts would have to overwrite the # headers set by mod_expires if they want another caching behavior. This may # fail if an error occurs early in the bootstrap process, and it may cause # problems if a non-Drupal PHP file is installed in a subdirectory. ExpiresActive Off </FilesMatch> </IfModule> # Various rewrite rules. <IfModule mod_rewrite.c> RewriteEngine on # Block access to "hidden" directories whose names begin with a period. This # includes directories used by version control systems such as Subversion or # Git to store control files. Files whose names begin with a period, as well # as the control files used by CVS, are protected by the FilesMatch directive # above. RewriteRule "(^|/)\." - [F] # To redirect all users to access the site WITH the 'www.' prefix, # (http://example.com/... will be redirected to http://www.example.com/...) # uncomment the following: # RewriteCond %{HTTP_HOST} !^www\. [NC] # RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # # To redirect all users to access the site WITHOUT the 'www.' prefix, # (http://www.example.com/... will be redirected to http://example.com/...) # uncomment the following: RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^ http://%1%{REQUEST_URI} [L,R=301] RewriteBase /drupal # Pass all requests not referring directly to files in the filesystem to # index.php. Clean URLs are handled in drupal_environment_initialize(). RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico #RewriteRule ^ index.php [L] RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] # Rules to correctly serve gzip compressed CSS and JS files. # Requires both mod_rewrite and mod_headers to be enabled. <IfModule mod_headers.c> # Serve gzip compressed CSS files if they exist and the client accepts gzip. RewriteCond %{HTTP:Accept-encoding} gzip RewriteCond %{REQUEST_FILENAME}\.gz -s RewriteRule ^(.*)\.css $1\.css\.gz [QSA] # Serve gzip compressed JS files if they exist and the client accepts gzip. RewriteCond %{HTTP:Accept-encoding} gzip RewriteCond %{REQUEST_FILENAME}\.gz -s RewriteRule ^(.*)\.js $1\.js\.gz [QSA] # Serve correct content types, and prevent mod_deflate double gzip. RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1] RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1] <FilesMatch "(\.js\.gz|\.css\.gz)$"> # Serve correct encoding type. Header append Content-Encoding gzip # Force proxies to cache gzipped & non-gzipped css/js files separately. Header append Vary Accept-Encoding </FilesMatch> </IfModule> </IfModule>

    Read the article

  • Vbscript - Checking each subfolder for files and copy files

    - by Kenny Bones
    I'm trying to get this script to work. It's basically supposed to mirror two sets of folders and make sure they are exactly the same. If a folder is missing, the folder and it's content should be copied. Then the script should compare the DateModified attribute and only copy the files if the source file is newer than the destination file. I'm trying to get together a script that does exactly that. And so far I've been able to check all subfolder if they exist and then create them if they don't. Then I've been able to scan the top source folder for it's files and copy them if they don't exist or if the DateModified attribute is newer on the source file. What remains is basically scanning each subfolder for its files and copy them if they don't exist or if the DateModified stamp is newer. Here's the code: Dim strSourceFolder, strDestFolder strSourceFolder = "c:\users\vegsan\desktop\Source\" strDestFolder = "c:\users\vegsan\desktop\Dest\" Set fso = CreateObject("Scripting.FileSystemObject") Set objTopFolder = fso.GetFolder(strSourceFolder) Set colTopFiles = objTopFolder.Files 'Check to see if subfolders actually exist. Create if they don't Set objColFolders = objTopFolder.SubFolders For Each subFolder in objColFolders CheckFolder subFolder, strSourceFolder, strDestFolder Next ' Check all files in first top folder For Each objFile in colTopFiles CheckFiles objFile, strSourceFolder, strDestFolder Next Sub CheckFolder (strSubFolder, strSourceFolder, strDestFolder) Set fso = CreateObject("Scripting.FileSystemObject") Dim folderName, aSplit aSplit = Split (strSubFolder, "\") UBound (aSplit) If UBound (aSplit) > 1 Then folderName = aSplit(UBound(aSplit)) folderName = strDestFolder & folderName End if If Not fso.FolderExists(folderName) Then fso.CreateFolder(folderName) End if End Sub Sub CheckFiles (file, SourceFolder, DestFolder) Set fso = CreateObject("Scripting.FileSystemObject") Dim DateModified DateModified = file.DateLastModified ReplaceIfNewer file, DateMofidied, SourceFolder, DestFolder End Sub Sub ReplaceIfNewer (sourceFile, DateModified, SourceFolder, DestFolder) Const OVERWRITE_EXISTING = True Dim fso, objFolder, colFiles, sourceFileName, destFileName Dim DestDateModified, objDestFile Set fso = CreateObject("Scripting.FileSystemObject") sourceFileName = fso.GetFileName(sourceFile) destFileName = DestFolder & sourceFileName if Not fso.FileExists(destFileName) Then fso.CopyFile sourceFile, destFileName End if if fso.FileExists(destFileName) Then Set objDestFile = fso.GetFile(destFileName) DestDateModified = objDestFile.DateLastModified if DateModified <> DestDateModified Then fso.CopyFile sourceFile, destFileName End if End if End Sub

    Read the article

  • Vbscript - Checking each subfolder for files

    - by Kenny Bones
    Ok, this is a script that's supposed to basically mirror two sets of folders. I managed to get it to work, but it seems like it didn't check each subfolder. So, I added these lines to the code: Set colFolders = objFolder.Subfolders Then I added this: For each subFolder in colFolders For each objFile in colFiles Dim DateModified DateModified = objFile.DateLastModified ReplaceIfNewer objFile, DateModified, strSourceFolder, strDestFolder Next Next This however does not seem to be working. This is the full code below. Dim strSourceFolder, strDestFolder Dim fso, objFolder, colFiles, colfolders strSourceFolder = "c:\users\vegsan\desktop\Source\" strDestFolder = "c:\users\vegsan\desktop\Dest\" Set fso = CreateObject("Scripting.FileSystemObject") Set objFolder = fso.GetFolder(strSourceFolder) Set colFiles = objFolder.Files Set colFolders = objFolder.Subfolders For each subFolder in colFolders For each objFile in colFiles Dim DateModified DateModified = objFile.DateLastModified ReplaceIfNewer objFile, DateModified, strSourceFolder, strDestFolder Next Next Sub ReplaceIfNewer (sourceFile, DateModified, SourceFolder, DestFolder) Const OVERWRITE_EXISTING = True Dim fso, objFolder, colFiles, sourceFileName, destFileName Dim DestDateModified, objDestFile Set fso = CreateObject("Scripting.FileSystemObject") sourceFileName = fso.GetFileName(sourceFile) destFileName = DestFolder & sourceFileName if fso.FileExists(destFileName) Then Set objDestFile = fso.GetFile(destFileName) DestDateModified = objDestFile.DateLastModified if DateModified <> DestDateModified Then fso.CopyFile sourceFile, destFileName End if End if if Not fso.FileExists(destFileName) Then fso.CopyFile sourceFile, destFileName End if End Sub

    Read the article

  • Make subfolder the root folder for everything in subfolder

    - by Illes Peter
    Hi there. I am working on a project that i host on my server. My server is mydomain.com and i want my project to run in mydomain.com/project. I wish to put an htaccess file in the project subfolder, so that in every file of the project, / will point to mydomain.com/project instead of mydomain.com So / will be mydomain/project, /lib/img will be mydomain/project/lib/img, etc. Any help will be greatly appreciated.

    Read the article

  • SubProject OR SubFolder ?

    - by user300435
    I am writing an asp.net application that exposes data in 2 ways: 1 - 1 common section that all users can see 2 - a Section that displays data specific to a registered user. in this case the user can decide how it looks (through themes), and manage the data to be displayed. Of course, the logic behind is the same, appearance would be different for as user1 and user2 The questions are : What would be best using : 'http://www.site.com/User1' or 'http://user1.site.com'. knowing that in both cases i have to make the displayed pages look like a seperate site then the root domain in anycase, the pages that will be displayed and customized on the fly are located in a subfolder of the of the asp.net project (projectrootpath\personalpages). What is the best way to map the personalpages subfolder to a subdomain or a 'http://www.site.com/userX' in the address bar. i also use "~/" in the urls which in this case needs to point to the personalpages rather then the root . Any help is gretaly apreciated.

    Read the article

  • Move asp.net website to subfolder/subdomain

    - by brz dot net
    What is the effective way to deploy an asp.net website in subfolder/subdomain? Actually I need to keep web.config in root directory and modify following things for this. Web.config Location tags Web.config authentication forms tag Web.sitemap Style.css Response.redirect/Server.transfer Image path Is there any way to avoid these changes? So my development work is not more different from production. Means I am expecting one place where applied changes are effective on whole site. No need to modify path on each page.

    Read the article

  • htaccess redirect to subfolder and mask the url?

    - by KiwiCoder
    Hello all, Two things: Firstly - I have version 2 of a website located in a folder named v2, and I want to redirect any traffic that is NOT a child of the v2 folder, to www.example.com/v2 The old site located in the root was created in iWeb and has a LOT of subfolders and sub-subfolders. So: www.example.com/v2 = New site www.example.com/Page.html www.example.com/category/Page.html ww.example.com/category/subcategory/Page.html = All generic examples of what I need to redirect. Secondly, and I don't know if this is possible, I want to hide /v2/ in the URL, so that visitors will just see www.example.com/page even though they are actually on www.example.com/v2/page Links are hardcoded to the v2 folder, like so <a href="v2/contact.html" Any help is MOST appreciated. I've spent hours trying to figure this out, but I'm only just learning about htaccess and regular expressions, and am totally confused. Thanks so much!

    Read the article

  • Redirect/Rewrite Subdomain to Subfolder

    - by Laurent Ho
    I'm trying to redirect a subdomain to a subfolder e.g. forums.domain.com to www.domain.com/forums Note that I started the forums in the subfolder format but worried that members might mistakenly try to access the forums using the subdomain format. RewriteCond %{HTTP_HOST} ^(www\.)?forums\.domain\.com RewriteRule .* /forums [L] From what I read the codes above should work through .htaccess, but do I still need to create a DNS A record to point to the IP address of the server?

    Read the article

  • Extract archive here, autodetect subfolder

    - by lorancou
    I use 7-Zip under Windows 7 to extract all kind of archives. The ever-running problem is that there is not a single way to handle subfolders. Some people create their archives like this (let's call it type A): . +-- subfolder ¦   +-- file 1 ¦   +-- file 2 ¦   +-- ... "Extract Here" will extract everything to subfolder/, which is fine; "Extract to <Folder>" will create an extra subfolder level, which is annoying. And other people create them like that (let's call it type B): . +-- file1 +-- file 2 +-- ... "Extract Here" will populate the current folder, which can bring a lot of mess if this folder already contains tons of other files, and which is very annoying; "Extract to <Folder>" will create a subfolder and conveniently stuff it with the archive content, which is fine. So this leaves two options: always choose to "Extract to <Folder>" and live with the extra subfolder for type A archives. Or open the archive before extracting it to check if this is a type A or B, and then appropriately select "Extract Here" or "Extract to <Folder>". I usually do the latter, but I just discovered that KDE is offering a very handy Extract Archive Here, Autodetect Subfolder feature that automates that. It'll "Extract Here" if there's only one subfolder in the archive, otherwise it'll "Extract to <Folder>". I love this idea. Is there a Windows 7 tool offering this option? Preferably integrated in the explorer context menu? Maybe it's hidden somewhere in 7-Zip and I just didn't find it?

    Read the article

  • apache domain redirect to subfolder

    - by Dennis
    I have a hosting account with godaddy. Its a linux system running apache. The way they do their setup is your primary domain is the root folder. When you add a subdomain its in a subfolder of the root which sucks. I want to setup a subfolder structure to organize my domains.. I called godday support and they said to use redirects.. but did not know how to do that.. How its setup now: primary domain: www.domain.com / sub.domain.com /sub I want to create a directory structure and then redirect to each but only show www.domain.com in the url www.domain.com /domain/www sub.domain.com /domain/sub I tried using: RewriteEngine On RewriteCond %{HTTP_HOST} ^(www.)?domain.com$ RewriteRule ^(/)?$ domain/www [L] but it just changes the url to www.domain.com/domain/www Can this be done in htaccess?

    Read the article

  • SEO for site with 301 redirect on root domain to subfolder

    - by Kim
    I've been asked to do SEO for a site. The site is made using Wordpress and prestashop. Because of this the root domain has a 301 redirect to a subfolder - domain/shop/ For my SEO submission work, I know it's not good practice to submit urls that have redirects on them and a lot of the time it's not allowed. After searching the net I think my best bet is to do all my site submissions using the url - domain/shop/ even though it will take a lot more listings to get them up in ranking compared to using their root domain. I'm not sure how it will work. The root domain has the greatest rank then passes rank to the rest of the site. If I'm targeting the subfolder will it work?

    Read the article

  • Geotargeted subfolder questions (Portugal/Brazil and Switzerland)

    - by Lucy
    We are at the beginning of the process to get multilingual versions of a website. We will be using subfolders working off the core domain (eg mydomain.com/fr/), set the geotargeting at webmaster tools and set hreflang attribute. I would really appreciate your help with a couple of questions. 1/Portuguese: we will have a Portuguese language version of the site. Our intention is to use this to cover users in both Portugal AND Brazil. ie, we are not going to do separate folders mydomain.com/pt/ and mydomain.com/br/ Can I use 2 hreflang attributes for this language version to tell Google it covers Brazil AND Portugal? What country code to use for this subfolder? 2/Switzerland Does anyone have best practice advice how to do this? One one hand, the subfolder should be mydomain.com/ch/ but as Switzerland covers 2 language possibilities (French AND German) - what to do? thanks

    Read the article

  • apache domain redirect to subfolder

    - by Dennis
    I have a hosting account with godaddy. Its a linux system running apache. The way they do their setup is your primary domain is the root folder. When you add a subdomain its in a subfolder of the root which sucks. I want to setup a subfolder structure to organize my domains.. I called godday support and they said to use redirects.. but did not know how to do that.. How its setup now: primary domain: www.domain.com / sub.domain.com /sub I want to create a directory structure and then redirect to each but only show www.domain.com in the url www.domain.com /domain/www sub.domain.com /domain/sub I tried using: RewriteEngine On RewriteCond %{HTTP_HOST} ^(www.)?domain.com$ RewriteRule ^(/)?$ domain/www [L] but it just changes the url to www.domain.com/domain/www Can this be done in htaccess?

    Read the article

  • URL Rewrite http to https EXCEPT files in a specific subfolder

    - by BrettRobi
    I am trying to force all traffic on my web site to use HTTPS, using the URL Rewrite 2.0 module added to IIS 7.5. I got that working and now have a need to exclude a couple of pages from using SSL. So I need a rule to rewrite all URL except those referencing this folder to HTTPS. I've been banging my head against the wall on this and am hoping someone can help. I tried creating a rule to match all URL except those in a nossl subfolder as in this example: <rule name="HTTP to HTTPS redirect" enabled="true" stopProcessing="true"> <match url="(/nossl/.*)" negate="true" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> <add input="{HTTPS}" pattern="off" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Found" /> </rule> But this doesn't work. Can anyone help?

    Read the article

  • URL Rewrite http to https EXCEPT files in a specific subfolder

    - by BrettRobi
    I am trying to force all traffic on my web site to use HTTPS, using the URL Rewrite 2.0 module added to IIS 7.5. I got that working and now have a need to exclude a couple of pages from using SSL. So I need a rule to rewrite all URL except those referencing this folder to HTTPS. I've been banging my head against the wall on this and am hoping someone can help. I tried creating a rule to match all URL except those in a nossl subfolder as in this example: <rule name="HTTP to HTTPS redirect" enabled="true" stopProcessing="true"> <match url="(/nossl/.*)" negate="true" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> <add input="{HTTPS}" pattern="off" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Found" /> </rule> But this doesn't work. Can anyone help?

    Read the article

  • Redirect public traffic to a different subfolder, while local traffic remains unchanged

    - by ecnepsnai
    I would like to have local (intranet) HTTP traffic go to the /var/www/html folder while any public traffic goes to the subfolder, /var/www/html/public I've tried this configuration, with some variation, in httpd.conf <VirtualHost PRIVATE-IP> DocumentRoot /var/www/html ServerName ecn ErrorLog /var/www/logs/error/private CustomLog /var/www/logs/access/private common </VirtualHost> <VirtualHost PUBLIC-IP> DocumentRoot /var/www/html/public ServerName PUBLIC-DOMAIN-NAME ErrorLog /var/www/logs/error/public CustomLog /var/www/logs/access/public common </VirtualHost> PUBLIC-IP, PRIVATE-IP, and PUBLIC-DOMAIN name are all replaced with the correct values in the actual document. The problem is, local traffic can browse fine but remote traffic is directed to the root folder and getting 403d (because I have that folder blocked off through my .htaccess file). If I append /public to the URL it works fine.

    Read the article

  • How do I zip up a folder but exclude the .git subfolder

    - by Tom
    I'm trying to create a zip file from a folder and I'd like to exclude the .git sub-folder from the resulting zip file. I have gone to the parent folder of the one I want to zip (called bitvolution) and I'm doing: zip -r bitvolution.zip bitvolution -x ".git" But it doesn't exclude the .git sub-folder. I've tried various combinations, -x .git*, -x \.git/*, -x .git/\*, -x \.git/\*. I've also tried using the full path for the exclude argument... but just didn't get there.

    Read the article

  • Wordpress .htaccess preventing subfolder access

    - by John K.
    This is sort of a goofy setup, but it's not in my power to reconfigure it at this time. I'm running in a shared hosting environment. The domain is example.com. This is an add-on domain on the host side with example.com being redirected to the www/example.com sub-directory. That directory houses a standard Wordpress site which acts as the main site when you visit example.com. The .htaccess file within that directory is: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^wp-admin/profile\.php$ /ssm/welcome [R] </IfModule> I have a subdirectory, at the root level with the /example.com subdirectory that houses a cake php application. That subdirectory is /tracker. My problem is that when I attempt to browse to example.com/tracker, I get a 404 from Wordpress because perma links are on. What I think I need is a rewrite rule in the Wordpress .htaccess file that short circuits the existing rewrite rules and permits example.com/tracker to work independently of the Wordpress install. Or a rewrite rule at the root level that short circuits the redirect to the /example.com directory in the first place. Not sure how well I explained that so here's a summary. The www/ directory structure: example.com/ tracker/ Add on domain of www.example.com redirecting to the /example.com directory with Wordpress and a tracker/ directory running CakePHP which I would like to access via www.example.com/tracker. If you need further info or clarification let me know!

    Read the article

  • .htaccess redirect to subfolder in different domain, maintaining old domain in the URL

    - by Naoise Golden
    Redirect has been widely discussed and most problems solved, so I am sorry for opening yet another post about this, but none of the codes I am trying work. I have a WordPress site hosted in http://mydomain.com/clientsdomain.com/wordpress I would like to temporarily redirect http://clientsdomain.com/ to the abovementioned URL, maintaining the clientsdomain.com domain in the URL. So for example http://clientsdomain.com/some/page would be pointing to http://mydomain.com/clientsdomain.com/wordpress/some/page Is this even possible with .htaccess? Maybe som configuration or plugin option with WordPress?

    Read the article

  • Subfolder non-www redirect

    - by Zealotry
    Is there a way to redirect a sub folder to no-www? What I use is: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] but this only redirects the www.example.com to example.com. I would like to redirect: www.example.com/home/ to example.com/home/ www.example.com/home/whatever URL to example.com/home/whatever URL. I have tried this: RewriteEngine on Options +FollowSymlinks -MultiViews RewriteCond %{HTTP_HOST} ^(www\.)?example\.com$ [NC] RewriteRule ^$ http://example.com [R=301,L] RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC] RewriteCond %{REQUEST_URI} !^/home/ [NC] RewriteRule ^(.+)$ http://example.com/$1 [R=301,L] This does not work, either. I can't really figure it out. Any help appreciated! ANSWER I figured it out and I will post it for others to see, if having the same issue. In the sub folder directory's .htaccess used the following: RewriteCond %{HTTP_HOST} ^(www\.example\.com)?$ RewriteRule ^(.*)$ http://example.com/subfoldername/$1 [R=301,L]

    Read the article

  • SEO, IIS 7 and web.config in subfolder issue

    - by tesicg
    We have ASP.NET application that has sub-folder with .aspx pages and separate web.config file in it. The .aspx pages in that sub-folder behave as separate site. In the web.config file at application level, I set the rule that removing trailing slashes: <rewrite> <rules> <rule name="RemoveTrailingSlashRule1" stopProcessing="true"> <match url="(.*)/$" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> </conditions> <action type="Redirect" redirectType="Permanent" url="{R:1}" /> </rule> </rules> </rewrite> I expect this rule will propagate downward to sub-folder as well. To access the site in sub-folder we should type: http://concert.local/elki/ and get it without trailing slash as: http://concert.local/elki But, the trailing slash remains. The web.config file in sub-folder looks as following: <configuration> <system.webServer> <defaultDocument> <files> <add value="Sections.aspx" /> </files> </defaultDocument> </system.webServer> </configuration>

    Read the article

  • URL subfolder rewrite without server access

    - by Duke03
    I am having trouble with the following. I have a site in development that has every link on the site pointing to the wrong folder. Example: example.com/en/home/, a site link goes to example.com/en/, which throws a 404. Now the way the system is setup requires server access but I do not have that and I/S is backlogged with requests and will take a week. But I still need to develop the site. So is there a way to have the browser recognize when example.com/en/ is clicked then automatically redirect it to example.com/en/home so it bypasses the 404 and I can actually work. Im looking for anything that gets the job done. I am considering developing a Chrome app to do this but that would mean a shit ton of overtime and more work I don't want to do. Is there a easier way of doing this?

    Read the article

  • htaccess redirect from root to subfolder and then mask the url?

    - by KiwiCoder
    Hello all, Two things: Firstly - I have version 2 of a website located in a folder named v2, and I want to redirect any traffic that is NOT a child of the v2 folder, to www.example.com/v2 The old site located in the root was created in iWeb and has a LOT of subfolders and sub-subfolders. So: www.example.com/v2 = New site www.example.com/Page.html www.example.com/category/Page.html ww.example.com/category/subcategory/Page.html = All generic examples of what I need to redirect. Secondly, and I don't know if this is possible, I want to hide /v2/ in the URL, so that visitors will just see www.example.com/page even though they are actually on www.example.com/v2/page Links are hardcoded to the v2 folder, like so <a href="v2/contact.html" Any help is MOST appreciated. I've spent hours trying to figure this out, but I'm only just learning about htaccess and regular expressions, and am totally confused. Thanks so much!

    Read the article

  • Add a new folder to each subfolder

    - by nomi49
    I have main a folder say E:\donuts and there are hundreds of folders inside it. e.g. E:\donuts\yellow\ E:\donuts\green\ ... E:\donuts\blue\ I want to create a new folder in each subfolder simply using some DOS command. Something like this. E:\donuts\yellow\big E:\donuts\green\big and so on. How can I achieve this? Also, would to be possible move the content of each subfolder into the corresponding big folder? For instance all the files and folders in E:\donuts\yellow\ should move to E:\donuts\yellow\big and so on.

    Read the article

  • nginx 301 redirect to subfolder on primary domain

    - by 187j3x1
    hello there, sorry for my poor english. i just set up wordpress on my vps, so far its the only item on my site. there for seo reason, i think is better redirect all primary domain to the blog folder. primary domain is example.com wordpress is at example.com/blog what i want is rewrite www.example.com and example.com to example.com/blog. googled got some scripts, and make some change paste into nginx config file. here is: #301 redirect www to non-www server { server_name www.example.com; location = / { rewrite ^/(.*) http://example.com/$1 permanent; } } #301 non-www to subfolder server { server_name example.com; location = / { rewrite ^/(.*) http://example.com/blog$1 permanent; } } it works at some degree, successfully redirect to example.com/blog. the only problem is i get 404 not found error. then i only make nginx redirect www to example.com/blog. ok, this time i can access blog page. i know there is something wrong in the non-www to subfolder script. but do not how to fix it :(

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >