.htaccess RewriteRule should mask URL, but redirects visibly insteadGeneric htaccess redirect www to non-wwwTips for debugging .htaccess rewrite rulesWhat will be the rewriterule to redirect when query is not a valid directory.htaccess URL masking instead of redirectingRewriteRule for first directory in URL onlyRedirect url and mask domain using htaccess.htaccess 301 redirect not working - tried Redirect, RewriteMatch, RewriteRulehtaccess RewriteRule doesn't work properly if no trailing slash.htaccess RewriteRule to mask url to fileLaravel htaccess, redirect url if find /en

What is this arch-and-tower near a road?

Why did C++11 make std::string::data() add a null terminating character?

List of Implementations for common OR problems

Why did the "Orks" never develop better firearms than Firelances and Handcannons?

Motorcyle Chain needs to be cleaned every time you lube it?

CPA filed late returns, stating I would get money; IRS says they were filed too late

What do you call the angle of the direction of an airplane?

How to deal with administrative duties killing the research spirit?

Is there a typical layout to blocking installed for backing in new construction framing?

How to calculate a conditional PDF in mathematica?

Did Stalin kill all Soviet officers involved in the Winter War?

Has chattel slavery ever been used as a criminal punishment in the USA since the passage of the Thirteenth Amendment?

How can I effectively map a multi-level dungeon?

Is it possible that Curiosity measured its own methane or failed doing the spectrometry?

Sleepy tired vs physically tired

Do the 26 richest billionaires own as much wealth as the poorest 3.8 billion people?

How should I present a resort brochure in my general fiction?

How to improve the size of cells in this table?

Can 4 Joy cons connect to the same Switch?

Why does the Batman "crack his knuckles" in "Batman: Arkham Origins"?

What can a novel do that film and TV cannot?

Explain how 'Sharing the burden' puzzle from Professor Layton and the Miracle Mask should be solved

My players like to search everything. What do they find?

Finding sum of divisors of numbers between the range (1 to 1e16)



.htaccess RewriteRule should mask URL, but redirects visibly instead


Generic htaccess redirect www to non-wwwTips for debugging .htaccess rewrite rulesWhat will be the rewriterule to redirect when query is not a valid directory.htaccess URL masking instead of redirectingRewriteRule for first directory in URL onlyRedirect url and mask domain using htaccess.htaccess 301 redirect not working - tried Redirect, RewriteMatch, RewriteRulehtaccess RewriteRule doesn't work properly if no trailing slash.htaccess RewriteRule to mask url to fileLaravel htaccess, redirect url if find /en






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I'm making a hard-coded list of a few Google-friendly "pretty URLs" to be rewritten to the actual messy URLs. We want the messy URLs to stay masked--so we don't want 301 redirects.



The pretty URLs are all in the form domain.com/buy/item-name, and the destination URLs are all pages in the domain root (PHP with parameters).



Our test case that fails:



domain.com/buy/test should mask to domain.com/content.php?do=123



Since /buy was never a real directory, I created it and am using the following .htaccess file within it. (This allows the current .htaccess work to be kept separate from the root .htaccess, and is a model we could follow with other directories in future.)



Thus, all we intend do is detect "test" (and other phrases within /buy) and mask that to the root page /content.php?do=123.



The /buy directory's entire .htaccess file is:



RewriteEngine On

RewriteRule ^test/?$ /content.php?do=123 [L]


That test RewriteRule connects to the destination just fine--but does not mask. The browser shows the unwanted messy URL.



Why? My only thought is: could there be something in the hosting company's default .htaccess at the root level which forces all RewriteRules to be redirects? If that's even possible, what should I look for there?



Thanks for any leads!










share|improve this question




























    0















    I'm making a hard-coded list of a few Google-friendly "pretty URLs" to be rewritten to the actual messy URLs. We want the messy URLs to stay masked--so we don't want 301 redirects.



    The pretty URLs are all in the form domain.com/buy/item-name, and the destination URLs are all pages in the domain root (PHP with parameters).



    Our test case that fails:



    domain.com/buy/test should mask to domain.com/content.php?do=123



    Since /buy was never a real directory, I created it and am using the following .htaccess file within it. (This allows the current .htaccess work to be kept separate from the root .htaccess, and is a model we could follow with other directories in future.)



    Thus, all we intend do is detect "test" (and other phrases within /buy) and mask that to the root page /content.php?do=123.



    The /buy directory's entire .htaccess file is:



    RewriteEngine On

    RewriteRule ^test/?$ /content.php?do=123 [L]


    That test RewriteRule connects to the destination just fine--but does not mask. The browser shows the unwanted messy URL.



    Why? My only thought is: could there be something in the hosting company's default .htaccess at the root level which forces all RewriteRules to be redirects? If that's even possible, what should I look for there?



    Thanks for any leads!










    share|improve this question
























      0












      0








      0








      I'm making a hard-coded list of a few Google-friendly "pretty URLs" to be rewritten to the actual messy URLs. We want the messy URLs to stay masked--so we don't want 301 redirects.



      The pretty URLs are all in the form domain.com/buy/item-name, and the destination URLs are all pages in the domain root (PHP with parameters).



      Our test case that fails:



      domain.com/buy/test should mask to domain.com/content.php?do=123



      Since /buy was never a real directory, I created it and am using the following .htaccess file within it. (This allows the current .htaccess work to be kept separate from the root .htaccess, and is a model we could follow with other directories in future.)



      Thus, all we intend do is detect "test" (and other phrases within /buy) and mask that to the root page /content.php?do=123.



      The /buy directory's entire .htaccess file is:



      RewriteEngine On

      RewriteRule ^test/?$ /content.php?do=123 [L]


      That test RewriteRule connects to the destination just fine--but does not mask. The browser shows the unwanted messy URL.



      Why? My only thought is: could there be something in the hosting company's default .htaccess at the root level which forces all RewriteRules to be redirects? If that's even possible, what should I look for there?



      Thanks for any leads!










      share|improve this question














      I'm making a hard-coded list of a few Google-friendly "pretty URLs" to be rewritten to the actual messy URLs. We want the messy URLs to stay masked--so we don't want 301 redirects.



      The pretty URLs are all in the form domain.com/buy/item-name, and the destination URLs are all pages in the domain root (PHP with parameters).



      Our test case that fails:



      domain.com/buy/test should mask to domain.com/content.php?do=123



      Since /buy was never a real directory, I created it and am using the following .htaccess file within it. (This allows the current .htaccess work to be kept separate from the root .htaccess, and is a model we could follow with other directories in future.)



      Thus, all we intend do is detect "test" (and other phrases within /buy) and mask that to the root page /content.php?do=123.



      The /buy directory's entire .htaccess file is:



      RewriteEngine On

      RewriteRule ^test/?$ /content.php?do=123 [L]


      That test RewriteRule connects to the destination just fine--but does not mask. The browser shows the unwanted messy URL.



      Why? My only thought is: could there be something in the hosting company's default .htaccess at the root level which forces all RewriteRules to be redirects? If that's even possible, what should I look for there?



      Thanks for any leads!







      apache .htaccess mod-rewrite






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 25 at 18:38









      adamsimadamsim

      1064 bronze badges




      1064 bronze badges






















          0






          active

          oldest

          votes










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55344451%2fhtaccess-rewriterule-should-mask-url-but-redirects-visibly-instead%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes




          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55344451%2fhtaccess-rewriterule-should-mask-url-but-redirects-visibly-instead%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현