I have a domain that looks like this when i visit certain link https://domain.com/model-profile/index.php?name=abbychampion
the site is written in php but i dont want to show this part index.php?name=
because for SEO purposes and better human reading.
Is this possible to hide ? so the link looks like this https://domain.com/model-profile/abbychampion
Stefce
146
Posting Pro
Recommended Answers
Jump to PostYes, it's possible, but how to do it depends on if you are using Nginx or Apache.
If it's Apache, you will need to add a mod_rewrite rule to an .htaccess file and upload it to the domain root. The contents of the .htaccess file would look something like this:
…
Jump to PostAre you using Apache with the above htaccess file or are you using Nginx? Is there anything else in your htaccess? What is the specific URL you are typing into your web browser?
Jump to PostI'm really sorry. I didn't get much sleep and admit I'm a little loopy, but i really don't see what is wrong with:
Options +FollowSymLinks RewriteEngine on RewriteRule ^([a-z0-9]+)/([a-z0-9]+)$ $1/index.php?name=$2 [L]
That should work, as should the rule I provided before. (This one is a little more …
Jump to PostSince changing the folder name, what does your .htaccess look like?
What did the .htaccess look like when it semi-worked? (e.g. it worked as long as there was no hyphen in the name?)
Jump to PostI was just thinking … can you show me the PHP code you’re using to generate the MySQL query?
All 27 Replies
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Stefce
146
Posting Pro
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Stefce
146
Posting Pro
Stefce
146
Posting Pro
Stefce
146
Posting Pro
Stefce
146
Posting Pro
Stefce
146
Posting Pro
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Stefce
146
Posting Pro
Stefce
146
Posting Pro
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Stefce
146
Posting Pro
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Stefce
146
Posting Pro
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Stefce
146
Posting Pro
Stefce
146
Posting Pro
Stefce
146
Posting Pro
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Stefce
commented:
Yes that is correct it worked without symbols
+6
Stefce
146
Posting Pro
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Stefce
146
Posting Pro
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Stefce
146
Posting Pro
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.