62: How to Remove the File Extension and Variables From the URL | Remove .php in URL | PHP Tutorial

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

КОМЕНТАРІ • 166

  • @matttepp3038
    @matttepp3038 6 років тому +13

    Watching Daniel teaching php, feels like when I started programming in late 2015, thanks to your videos.

  • @nancyfazal2536
    @nancyfazal2536 6 років тому +4

    Hei...I just felt blessed to found your tut on youtube...No one ever taught like you...Bundle of thanks

  • @TheLeontheking
    @TheLeontheking 6 років тому +40

    hell that htaccess has some annoying syntax..

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

    THANK YOUUUUUU!! I've been looking for this exact tutorial for ages.

  • @gustavinus
    @gustavinus Рік тому

    Neat stuff. I will use it to rewrite .html files to .php files and also to remove the .php files from the URL. All while still being able to parse legacy links that used the old URLs.

  • @VietLe-eq3yk
    @VietLe-eq3yk 3 роки тому +1

    After all day searching, you saved me !

  • @Ditzj
    @Ditzj Рік тому

    Thanks, just what I needed for a specific part of my project.

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

    nice bro! Your my idol in your every explanation, it so clear and understable! keep up.... May God Guide you..

  • @ahmedjubayer5419
    @ahmedjubayer5419 6 років тому +4

    you are the best bro! i have been watching your php tutorial for month & today is the last episode .nobody teaches as clearly as you taught.i just want you to know i learnt php from you! thank you so much! i know php,java script,html,css nd boostrap ! will you suggest me a book or some thing ! or should i start doing web devoulopment project on my own to check out and improve my skill!? once again ! thank you so much!

  • @Abhishek-iq1es
    @Abhishek-iq1es 3 роки тому +1

    Thank You So Much
    Your Are Really Helping

  • @olekristianmller-hansen4220
    @olekristianmller-hansen4220 4 роки тому +9

    Hello, Daniel. Thank you for the tutorial. Do you know how I would check if the requested URL contains any file with the extension "php" and responds with HTTP code 403? I want to make my Apache web server respond with 403 Access Denied to any request for a .php-file regardless if that file exists or not.

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

    Explained very well. Exactly what I needed.

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

    Brilliant, thanks, well explained. Now off to try and implement!

  • @joelnjoroge7202
    @joelnjoroge7202 7 місяців тому +1

    If your script doesn't load javascript and css when you redirect using htaccess as shown here, it is because the location of this files were not found by the server. You can add this tag in your html head section of your script: or just incase you are not in a particular custom folder (i.e if you are in xampp/htdocs/ or if you are on a server you are on home/public_html/).
    Make sure the paths to your files are correctly written

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

    Thanks a lot i was looking for this tutorial for a long 😍😍😍

  • @Mutlaq777
    @Mutlaq777 5 років тому +1

    ..
    Thank you
    This tutorial is very helpful with short URL script ❤️.

  • @matttepp3038
    @matttepp3038 6 років тому +3

    I experimented a bit...
    *# SIMPLE PAGE REWRITE*
    *RewriteCond %{REQUEST_FILENAME} !-d*
    *RewriteCond %{REQUEST_FILENAME}\.php -f*
    *RewriteRule ^(.*) $1.php [NC,L]*
    If you paste this into your *.htaccess* file, you can have clean URLs for pages that don't require any GET parameters, it basically only cuts out the .php part of the URL

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

      Hehe exactly :) your code looks identical to my HTML lesson on this, so I can vouch that your code is working ;)

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

      Oh I haven't seen that video yet, I usually just watch your PHP tutorials, but thanks for vouching. :D

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

    the lesson is wonderfully done and only lacks proper httpconf editing for when nobody managed to run .htaccess, but in this case this part deserves to be made in its own ova, i mean episode :D thanks teacher i always learn and get updated a lot from this channel.

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

    Thanks Bro, great help. God Bless You!

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

    Thank u for your selfless work 🙏

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

    Thank you bro, you have saved my life!

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

    Best programming youtuber :-)

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

    Thank you for the detailed explanation!

  • @the-pratik
    @the-pratik 3 роки тому +1

    Hello sir, I used your method but when I change old url to new css and js isn't applied. Can you tell how to fix it?

  • @MrSachinRawat
    @MrSachinRawat Рік тому

    You are amazing 👍

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

    nice nice! this video saves me. Thanks mmtuts!

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

    This was very helpful thanks

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

    For css and js to work, add the following to :
    Change the url to your site's homepage.
    I currently get homepage url through
    function home_url() {
    return ''.$_SERVER['SERVER_NAME'].'/';
    }
    Hasn't given an issue in multiple domains.

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

    Great tutorial bro.

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

    thank you it was useful

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

    Thanks man, but I ran into a problem: now when I enter my site it won’t load the css. The default url looks like this view.php?site=index and the new one view/index. I did everything like in the video, do you maybe know how to fix this problem? 😁

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

    Greetings, one really GOOD tutorial i gotta say, but i have one question if you dont mind... is there a particular reason why when i load the same url with the new parameters it wont grab the css file? shows up all the information but without visuals. and when i used the normal paremeters the css do loads up.

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

    Thank you 😁

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

    Hi Daniel, this part is clear, but what if I send a variable via web form in the input tag and wanna to appear in the "clean" url? For example, I have input tag with name=town and value=zagreb and wanna url to be */town/zagreb ?

  • @leluonghue
    @leluonghue 2 роки тому +1

    Hi Daniel, thank you for the tutorial. I did as your, everything is ok, but images. All images is added "article/" before image, and make it could not be showed. for example : files/picture.jpg become article/files/picture.jpg
    Could you give any solution for that issues?
    Thank you.
    Hue Le

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

      Did you find a solution for this? I'm having the same problem with my images url.

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

    Should we really write those sentences for each page? Is there any way to make it recognize the page name automatically?

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

    Will this actually effect search engines such as Google to index webpages?

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

    This method doesn't work if there are js and CSS files included in the PHP page. Any help with that?

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

    great tutorial but my css does not show with parameters in the url!!! dont why wondring if you could help. Thanks

  • @iggyzane
    @iggyzane 5 років тому +1

    Thanks so much for this. How do you remove 'index.html' from the landing page? I have the htaccess working for my links.

    • @iggyzane
      @iggyzane 5 років тому +2

      This ended up working for me: RewriteRule ^index\.html$ / [R=301,L]

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

    Thank you

  • @szymonbartanowicz8539
    @szymonbartanowicz8539 6 років тому +1

    Hey! Mmtuts, can You make a video how to use it on your project from episode 57 (a search field). I'm convinced it's more practical example :), btw, thanks for Your videos

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

    Can you help me?
    What if I have a folder name in the same directory as a file name which has the same name as the folder:
    - index.html
    - xyz (folder)
    vb.html
    abc.html
    - xyz.html

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

    Thanks

  • @joachimvoigt2199
    @joachimvoigt2199 Рік тому

    good lesson! But relative links (file paths) are not working any more from a redirected page. Is that the way it should be?

    • @joelnjoroge7202
      @joelnjoroge7202 7 місяців тому

      include this in your head tag to solve the issue

    • @joachimvoigt2199
      @joachimvoigt2199 7 місяців тому

      @@joelnjoroge7202 thx, I didn't know base href, using this is probably best practice. Since I have a php environment I have managed so far by writing the base path into a variable which does the job too. 👍

    • @joelnjoroge7202
      @joelnjoroge7202 7 місяців тому

      Welcome

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

    Hi... could you tell me the rewrite rule for hiding post names in address bar so that users though they copy and paste url in addressbar does't work.

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

    Is there a way to account for not always having both variables passed? (But still wanting both variables to be ABLE to be passed) Such as article/10 ?? But also to allow article/10/HelloWorld

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

    it is not working with me, is this because I am not online?

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

    Hello sir, I have a custom-made PHP website with its database pointing to a demo URL. Is there a way to change the URL? It is fully PHP based, with many plugins for queries and other calculations. The website is working on my other domain and I just need to change the domain name and hosting server. Any help would be hugely appreciated.

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

    Thank you for the tutorial, but my problem is when I post the new link to facebook. and when I click the URL from facebook. it will redirect me to my old URL structure. Hoping you read this

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

    @mmtuts how would you make it so on your website people would create information and they could hit a button to post it. How would you make it so you can search for the information. For example you search the persons name and find the information for what they posted.
    All on the same site

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

    Great tutorial!

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

    to anyone who is having a hard time to get this working,
    you need to put the .htaccess file in the appropriate folder to get it to work,
    for example:
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}\.php -f
    RewriteRule ^test/([0-9]+)/([0-9a-zA-Z_-]+) test.php?id=$1&name=$2 [NC,L]
    works only in the correct folder which was: /public_html/p/oldtests, htaccess cannot go through sub directories

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

    Great tutorial but i do have one problem the css breaks

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

    i see you got a .net, but its a local server, so how did you do that?

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

    I get mixed results using this on live and local servers... using local some of the rewrites work and some don't, it's a massive headache.

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

    Question: what if I wanted to get rid of /article/ portion? In other words, I want mutts.net/4/Daniel. What would the htaccess file look like then?

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

    Hi
    I have a question.
    I have a page called Peoduct.php
    so when user click on one product i open
    ProductDetails.php file with some parameters like id and name of that product.
    But i don't want to show [ProductDetails.php?id=10%name=hello] to user instead i want to show NameOfProduct.php just that name of product is just name that was clicked by user. don't want to show static name like ProductDetails with passed parameters.
    Can you tell me how i can do this?
    Thanks

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

    Thanks :D

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

    If it is an NGINX server that is not an Apache server, which file will replace .htaccess.

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

    image cs and js error? any solution for that? evyrthing else working fine with db fetch.. but image css errors

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

    doesn't work for me, as I am trying to place this .htaccess into a subfolder "articles", like in:
    example.com/articles/article.php?=239
    then in the url address:
    example.com/articles/article/239
    but I get error file not found, and I'm not sure what the reason is

  • @bumblebee-eg1eq
    @bumblebee-eg1eq Місяць тому

    best

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

    Sir, Can you please make a video on search a given string inside all tables of my current selected database. And after finding the result show inside a page like a search engine

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

    how can i still redirect to a correct page despite not detecting an \.php extention in php ?

  • @dekesmith2589
    @dekesmith2589 4 роки тому +2

    Does anyone know how he is using $_GET on the rewritten URL? As soon as I reWrite the URL my $_GET variables become undefined. I've searched the internet for hours and can't figure out how this is working for him.

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

      Works fine for me. Did you pass any data through them? For undefined variable unless they get some data you can use @ before variable to stop seeing these errors.

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

      I faced the same problem and after search for hours I could not find a solution

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

    Thank you so much it worked perfect for me but the css styling isn't showing. Does anyone have any idea why?

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

      I lost my favicon was getting error 404 and it was there. Try to use php code after head section. may this help.

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

    I have a home.php
    inside this home are 2 links (2 languages) - home.php?lang=ru and home.php?lang=en
    how to make them as domainDOTcom/en/.......??? what is the correct line for rewriteRule?

  • @vitor-peixoto
    @vitor-peixoto 5 років тому +3

    My stylesheet doesn't work when I do this, does anyone knows why?

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

      use absolute paths like shown by @Nero90 up in the comments

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

    So, how would I go about this when accessing the directory, but not referencing index.php? Example localhost/?page=Main -> localhost/Main

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

      Nevermind, I figured it out.
      RewriteEngine on
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^/*([a-zA-Z]+) index.php?page=$1 [NC,L]

  • @bk._550
    @bk._550 4 роки тому

    its working, but if I didnt include one parameter in the url it will give 404. How to fix that

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

    Hey, i managed to change the url, but the .css is not loaded

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

    Php God 💛

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

    I want to upload my own website with a backend database, but am having trouble finding ways to do so. I have been looking into azure but all the videos I've seen use Azure Clear DB which is not currently availiable. Anyone have any suggestions?

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

    Nice. And You resemble Elon Musk

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

    Is this code work on localhost?

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

    After i tried this, my css & image file won't load, what should i do?

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

    Imagine i have
    example.com/edit/profile?id=1 (where edit is a real folder and inside it i have profile.php)
    I want the rule to be
    example.com/edit/profile/1
    Can I do this with pure PHP? I've been trying and didn't manage it to get it working

  • @sunsun4961
    @sunsun4961 Рік тому

    🥳 Alternative Solution | .htaccess not working on local:
    The issue I ran into is that everything worked as it is supposed to on the production server, but not locally. If you are using something like VSCode you need the .html file extension within your links in order to move around your site on vscode live server.
    So you end up running into an issue where if you configure your .htaccess file and remove the .html extension from your links (as shown in the video); everything will work fine when deployed to your public site… however locally you won’t be able to move around your site using vscode live server because the links will display as broken.
    A workaround solution I implemented; if you are using a task runner like Gulp or Grunt is to install a plugin such as gulp-replace (which allows you to setup a automation to replace a string) and setup your gulpfile.js to remove the .html extension from all links within the page when the task is ran. This worked like a charm for me; on my local machine the .html extensions are still in the page links, allowing me to view my site normally on vscode live server. But then before deploying to my public site, the .html extensions are found and removed automatically so that .htaccess can run as intended.
    Example:
    const replace = require('gulp-replace');
    // Remove .html extension in all .html files
    gulp.task('rm-html-ext', async function () {
    gulp.src('src/*.html')
    .pipe(replace('.html', ''))
    .pipe(gulp.dest('dist'));
    });
    The code above basically says, when the task is ran 1) search through all html files located inside the site folder, then 2) for any links within the page that contain .html replace it with ‘’ (aka nothing) and then 3) place the modified html file(s) with .html extensions removed into the production folder. 

Special Note: If you already have a “copy-html” task in your gulpfile.js then be sure to place this task after that one…

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

    Please I don't know why I'm receiving "Internal Server Error"

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

    please can u describe how to send data in url using the same process like ie test.php?id=12 how this can be done plz do reply

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

      You can use your id with $_GET["id"]. And you should check, if it exists with if( isset($_GET["id]) ) { do stuff...}

  • @cipriang.4952
    @cipriang.4952 4 роки тому

    Hello, can you make this for my site (I pay of course if necessary). I am afraid not to mess all my site :). More detalils after your answer

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

    So i did everything 100% like u i even checked everything but when im clicking on the title link of my content im getting the rewritelink but my website don't have a css design how can i fix this?

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

      nvm fixed that but somehow i get now only mysqli errors like it can't find the variable $id $title even i includes the article.inc.php right!

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

    My CSS is not working .htaccess is working perfectly but css not

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

    Undefined array key "post_url" in article.php on line 5 when accessing the rewritten url

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

      Options -MultiViews solved it...

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

    may I know your computer specs for web development? I noticed that you have a lot of apps on your taskbar I just wonder, what computer specs I need to have for web development

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

      You only need a computer powerful enough to handle a text editor and browser. As long as it handles that, it can be used just fine for web dev. For example, I'm currently away and using a cheap HP laptop with an i3 7100U, an SSD but no dedicated GPU - it handles my FTP client, many tabs in chrome, Sublime Text, XAMPP and loads of other running apps a lot smoother than I would have expected it to.
      I would say you are fine with any PC that has an Intel i3/5/7 or Ryzen 3/5/7 from the last 5 years AND has an SDD - it helps slower PCs a lot.

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

    In php only about when i click on anchor url showing about.php?alias=amar any changes here i need this type sir about/amar

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

      Hey you can use URL like this about I hope this will help.

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

    I rewrite code same as you did, url is good, but it seems like i have trouble with $_GET paremeter, and on post.php i have an error Undefined index: p_id, when i var dump $_GET parameter, it's empty, any suggestion? :)

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

      Hi. I know this is an old comment, but did you ever figure this out? I'm having the same issue. Cannot figure out how he is accessing those $_GET variables after the rewrite

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

      @@dekesmith2589 I think the problem was in WAMP server which i used... If you use same one, try switching on XAMP, just like in this tutorial.. In the end, it's important to understand concept.

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

      @@aleksandarkrasic8324 I was using MAMP but also tried on my live server and still no luck. In the end I abandoned the .htaccess method and instead am using the PHP method to rewrite my URL's and retrieve parameters. Thanks anywway for the advice.

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

      @@dekesmith2589 No problem... As you learn more, you will eventually move on some framework, such as Laravel. There you have everything settled, but it's always good to have solid base!

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

    For now : I followed video but Link showed only html, It wasn't styled. Why ?

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

      It’s a PHP course 🙂 HTML and CSS is a skill that should be known by now, so the only important part you should need is the PHP. The CSS is so basic in these PHP videos you should easily be able to create it if you need it, and if not I recommend checking out my HTML & CSS course.

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

    My htacess file doesnt work on my xampp server

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

    Can u show us many to many relationship at mysql?

  • @johnpaul-qx7zq
    @johnpaul-qx7zq 6 років тому

    Hello, can you please make a video on API's with php especially token authentication. I want people to be able to use services of my other websites with an account created at accounts.mysite.com. For example you create an account with google at accounts.google.com then you can use the same account on differents sites like gmail, youtube , etc.

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

    why youtube does have htaccess file ? ':p

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

    Could you please advise why my get variables become undefined when doing this? This is what I have:
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}\.php -f
    RewriteRule ^ia/cms/admin/index/([0-9]+) ia/cms/admin/index.php?user=$1 [NC,L,QSA]
    ia/cms/admin/index/1 is what it should be and my get variable is undefined...

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

      Hi. I know this is an old comment, but did you ever figure this out? I'm having the same issue. Cannot figure out how he is accessing those $_GET variables after the rewrite

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

      @@dekesmith2589 Sorry, I didn't. I gave up on bothering. I just let the links be as they are.

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

      @@IsaacA192 ah ok no worries. Thanks anyway for the reply

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

    Thanks but not works with photoplog images

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

    how can i do this on nginx??

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

    18:22 but how do i supposed to know what parameters the user will send in the URL ?!

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

      Hi :) You are not supposed to know what data the user sends... But perhaps you mean the names we use for the data in the URL? Such as the "id" and "name" which I used in this episode. These are all decided by you (the developer), the user doesn't get to decide that.

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

      OK Dani, it was just my own misunderstanding as to the nature of this file.

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

    It's not working for my project my url is like this localhost/project/products.php?pid=Signal%20Booster
    and i want to show this url as localhost/project/Signal%20Booster
    please help me

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

    make a video of how to make a search bar in php & mysql

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

      I already have that tutorial in this playlist :)

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

      Oh nice work! I love your video’s I learn a lot
      Keep on the good work!

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

    Para los que talvez tuvieron este error que yo tuve con wampserver (apache 2.4 y php7) me redirigia me salia un error
    Undefined index: publicacion_id, lo resolvi escribiendo esto en el .htaccess:
    Options -MultiViews
    RewriteEngine on
    RewriteRule ^blog/([0-9]+)$ blog.php?publicacion_id=$1