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

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 พ.ย. 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

    • @jinujawad
      @jinujawad  3 ปีที่แล้ว

      Thanks and welcome

  • @harshilkaneria2107
    @harshilkaneria2107 5 ปีที่แล้ว +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

  • @sunithav7334
    @sunithav7334 4 ปีที่แล้ว

    Thanks it solved my purpose.Nicely explained.

  • @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 ปีที่แล้ว

      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]

  • @MrTerroristGames
    @MrTerroristGames 3 ปีที่แล้ว

    Thank you, works perfectly.

  • @tanmoyaddyapcs5743
    @tanmoyaddyapcs5743 4 ปีที่แล้ว +1

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

  • @shubhamgupta3530
    @shubhamgupta3530 3 ปีที่แล้ว

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

  • @justinwang7582
    @justinwang7582 4 ปีที่แล้ว

    very clear instructions. thx

  • @PauloFernandoCe
    @PauloFernandoCe 5 ปีที่แล้ว

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

  • @jestonibabas5290
    @jestonibabas5290 4 ปีที่แล้ว

    Nice bro 😁 tnx keep sharing

  • @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?

  • @FreelancerNishad
    @FreelancerNishad 3 ปีที่แล้ว

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

  • @shawnmckenzie9490
    @shawnmckenzie9490 4 ปีที่แล้ว

    Very Helpful! Thanks

  • @amuslimheart8526
    @amuslimheart8526 3 ปีที่แล้ว

    Thank you very much..man

  • @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

  • @harshachacko4989
    @harshachacko4989 4 ปีที่แล้ว

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

  • @ernestomotta5178
    @ernestomotta5178 4 ปีที่แล้ว +1

    Thank you, friend

  • @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.

  • @rituparnamondal1866
    @rituparnamondal1866 4 ปีที่แล้ว

    thank you sir

  • @manumathew88
    @manumathew88 2 ปีที่แล้ว

    how to remove image/ from url

  • @EpickyHrac
    @EpickyHrac 4 ปีที่แล้ว +1

    Amazing big like and subscrube

  • @jestonibabas5290
    @jestonibabas5290 4 ปีที่แล้ว

    Done subscribed to your channel

  • @mr.mhdhanvi
    @mr.mhdhanvi ปีที่แล้ว

    ❤❤

  • @gagandeepfoxmediahub5841
    @gagandeepfoxmediahub5841 3 ปีที่แล้ว

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

    • @Muhammad_Naeem662
      @Muhammad_Naeem662 ปีที่แล้ว

      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 ปีที่แล้ว

    Thanks

  • @vivek5147
    @vivek5147 6 ปีที่แล้ว

    Plz upload video image crop and upload with php and jquery