আজ
আমি আপনাদের দেখাবো কিভাবে আপনি আপনার সাইট এর ইউ আর এল এক্সটেনশন থেকে
.html , .php , .aspx ইত্যাদি রিমুভ করবেন । এর জন্য প্রথমে আপনার কন্ট্রোল
প্যানেল এ লগিন করুণ তার পর আপনার ফাইল ম্যানেজার এ প্রবেশ করুণ । ওখানে
দেখুন
.htaccess
নামে একটি ফাইল আছে , এখন আপনি এই ফাইল টিতে ক্লিক করে এডিট বাটন চাপুন এডিটর এ ফাইল টি ওপেন হলে এই কোড টুকু জুড়ে দিনRewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
এখানে খেয়াল করুণ$1 এর পরে .পিএইচপি আছে আপনার ফাইল টি যদি পিএইচপি হয় তাহলে এটা বদলানুর দরকার নেই ,যদি আপনার ফাইল টি এইচটিএমএল ফাইল হয় তাহলে আপনি
$1 এর পরে .পিএইচপি
লেখাটি বাদ দিয়ে .এইচটিএমএল লিখে দিবেন ,যদি আপনার ফাইল টি aspx ফাইল হয় তাহলে আপনি
$1 এর পরে .পিএইচপি
লেখাটি বাদ দিয়ে .aspx লিখে দিবেন , আর লিখা শেষ হলে আপনার ফাইল টীকে সেভ দিয়ে ক্লোজ করে দিবেন তাহলেই হয়ে যাবে . আর আপনি যখন আপনার ফাইল টি কে লিঙ্ক করাবেন তখন আপনাকে আর ফাইল এর এক্সটেনশন দিতে হবে না , যেমন এখানে দেখুনNormal 0 false false false MicrosoftInternetExplorer4
<a href="http://whatever.com/wallpaper" title="wallpaper">wallpaper</a> আমি ভালো বাংলা টাইপ করতে পারি না তাই খানিকটা ইংলিশ এ দিলাম
Adding a trailing slash at the end
I received many requests asking how to add a trailing slash at the end. Ignore the first snippet and insert the following code. The first four lines deal with the removal of the extension and the following, with the addition of the trailing slash and redirecting. Link to the HTML or PHP file as shown above. Don’t forget to change the code if you want it applied to an HTML file.Some people asked how you can remove the extension from both HTML and PHP files. I haven’t got a coding solution for that. But, you could just change the extension of your HTML file fromRewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/$ $1.php
RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)$ /$1/ [R=301,L]
.html
or .htm
to .php
and add the code for removing the .php
extension./* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;}
0 comments :
Post a Comment