Hide .php extensions, Custom url for PHP pages with parameters, htaccess

Поділитися
Вставка
  • Опубліковано 12 вер 2024

КОМЕНТАРІ • 32

  • @amuslimheart8526
    @amuslimheart8526 3 роки тому

    I just subscribe your channel and liked your video..I generally do not do this..but your video was very helpful to me..Alhamdulillah

  • @sunithav7334
    @sunithav7334 3 роки тому

    Thanks it solved my purpose.Nicely explained.

  • @harshilkaneria2107
    @harshilkaneria2107 4 роки тому +4

    How to set
    when hit url
    localhost/about.php to localhost/about
    Because if we hit localhost/about.php it is doesn't change to localhost/about

  • @PauloFernandoCe
    @PauloFernandoCe 5 років тому

    Thank`s man, you save my life !!!

  • @shubhamgupta3530
    @shubhamgupta3530 3 роки тому

    great work and thank you for this video keep it up bro

  • @MrTerroristGames
    @MrTerroristGames 3 роки тому

    Thank you, works perfectly.

  • @tanmoyaddyapcs5743
    @tanmoyaddyapcs5743 3 роки тому +1

    first RewriteRule is working ,,,the second one is not working..suggest me...

  • @justinwang7582
    @justinwang7582 4 роки тому

    very clear instructions. thx

  • @jestonibabas5290
    @jestonibabas5290 3 роки тому

    Nice bro 😁 tnx keep sharing

  • @shantiswarupmahapatra5000
    @shantiswarupmahapatra5000 4 роки тому +3

    Nicely explained!
    Could you just post something where we can restrict the actual page name if typed in the url

    • @Muhammad_Naeem662
      @Muhammad_Naeem662 9 місяців тому

      Kindly, replace you PHP hiding script with this script..... When a user will type a URL with PHP extension. At the mean time it will be redirected to extensionless URL,,,, For example; From "index.php" to "index".
      RewriteEngine on
      RewriteEngine On
      # Redirect from .php to extensionless URL
      RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/(.+)\.php [NC]
      RewriteRule ^ /%1 [R=301,L]
      # Rewrite extensionless URL to actual .php file
      RewriteCond %{REQUEST_FILENAME}.php -f
      RewriteRule ^([^\.]+)$ $1.php [NC,L]

  • @FreelancerNishad
    @FreelancerNishad 3 роки тому

    Thank you so...................much.

  • @shawnmckenzie9490
    @shawnmckenzie9490 4 роки тому

    Very Helpful! Thanks

  • @amuslimheart8526
    @amuslimheart8526 3 роки тому

    Thank you very much..man

  • @harshachacko4989
    @harshachacko4989 4 роки тому

    Thank u soooooooooo much....... Love you

  • @ernestomotta5178
    @ernestomotta5178 4 роки тому +1

    Thank you, friend

  • @AmitSharma-gr6kb
    @AmitSharma-gr6kb 5 років тому +1

    Sir please tell me if I go for details page through title and I want title as URL without detail-page.php then what will I do for .....for ex. I am on blog.php page which have dynamic link like blog-detail.php? title= And I want to show title only in URL ...... please sir tell me

  • @rituparnamondal1866
    @rituparnamondal1866 4 роки тому

    thank you sir

  • @EpickyHrac
    @EpickyHrac 4 роки тому +1

    Amazing big like and subscrube

  • @mr.mhdhanvi
    @mr.mhdhanvi Рік тому

    ❤❤

  • @ngajelwangdi6747
    @ngajelwangdi6747 2 роки тому

    Thanks for your tutorial. I have my project folder as(inventory), inside inventroy folder, i have another folder as (includes). Inside the includes folder, i have navigation file or menu file. Now i have eg. home.php inside the inventory folder. So how i can play with my .htaccess file?

  • @jestonibabas5290
    @jestonibabas5290 3 роки тому

    Done subscribed to your channel

  • @vivek5147
    @vivek5147 6 років тому

    Thanks

  • @manumathew88
    @manumathew88 2 роки тому

    how to remove image/ from url

  • @macnussolutions601
    @macnussolutions601 4 роки тому

    This is very use full video but i have one doubt how to pass parameter in dynamically in header location for ex : (window.location='demo.php?id=') but i need solutions for : ( demo/1 ) give me the solutions for this question.

  • @gagandeepfoxmediahub5841
    @gagandeepfoxmediahub5841 3 роки тому

    brother when i passing parameter is showing request url not found can u provide the solution

    • @Muhammad_Naeem662
      @Muhammad_Naeem662 9 місяців тому

      Step. 1
      Create `.htaccess` file in that folder where your all website files are located.
      Step. 2
      Edit your `.htaccess` file and paste the following script into the `.htaccess` file..
      RewriteEngine on
      RewriteEngine On
      # Redirect from .php to extensionless URL
      RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/(.+)\.php [NC]
      RewriteRule ^ /%1 [R=301,L]
      # Rewrite extensionless URL to actual .php file
      RewriteCond %{REQUEST_FILENAME}.php -f
      RewriteRule ^([^\.]+)$ $1.php [NC,L]

  • @reynandelizo1480
    @reynandelizo1480 2 роки тому

    why not woking to my code

  • @vivek5147
    @vivek5147 6 років тому

    Plz upload video image crop and upload with php and jquery